© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
4 replies
HiveMind

Change language at runtime in WPF

Hi! I have a set of *.resx files with translations and they work fine when I start the app. If I start on computer with english system, it chooses english translation, if I choose spanish system, it loads spanish translation, etc. But how can I change it at runtime?

Currently, I'm doing it in this way:
<Label FontSize="10" Foreground="Gray" Margin="0,10,0,0" Name="languageLabel" Content="{x:Static p:LanguageVersion.Settings_Language}"/>
<Label FontSize="10" Foreground="Gray" Margin="0,10,0,0" Name="languageLabel" Content="{x:Static p:LanguageVersion.Settings_Language}"/>

And I guess, I will need to change every x:Static, but I'm ready for this sacrifice.

I'm trying to change language in this manner:
Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("pl");
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("pl");
Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("pl");
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("pl");

But it doesn't do anything
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Change image stream runtime (WPF/XAML)
C#CC# / help
3y ago
MVVM WPF - Change Color in ColorAnimation in Style ControlTemplate on Runtime
C#CC# / help
3y ago
❔ Wpf app can't find libraries at runtime
C#CC# / help
3y ago