I try to make my application multilingual. For this I have created two resource files:
Both are set to public and contain the same keyword and translation. I can also access the keywords in the backend -> see image. Unfortunately my program does not load the files when I change the language.
My steps:
<Button x:Name="Home_Button" Style="{DynamicResource Menuebutton}" Content="{x:Static p:Resources.Menue_home}" Click="Home_Click"/>
xmlns:p="clr-namespace:VS_Launcher.Properties"
CultureInfo myCultureInfo = new CultureInfo("en-US");
CultureInfo.DefaultThreadCurrentCulture = myCultureInfo;
CultureInfo.DefaultThreadCurrentUICulture = myCultureInfo;
Thread.CurrentThread.CurrentCulture = myCultureInfo;
Thread.CurrentThread.CurrentUICulture = myCultureInfo;
In another project I did the same thing. But there the solution worked. What is my error?
Are you sure the file names of alternative language resources (excluding culture-locale) are identical with default one? If the default one is Resources
.resx, alternative ones must be like:
s
.de-DE.resxs
.en-US.resx