I create main folder "Strings" with folders en,eu etc. Then i create resource file and fill it. All wark. Can i change Application Language from code? For example add language to comboBox and then after click on combobox change my language?
Asked
Active
Viewed 1,872 times
0
-
Welcome to StackOverflow. Check the StackOverflow's help on asking questions first, please. Focus on [How to ask a good question](http://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve), but also other [help topics](http://stackoverflow.com/help/asking) would be useful. – David Ferenczy Rogožan Jan 08 '16 at 23:35
1 Answers
1
You can use CurrentCulture and CurrentUICulture for this. In your combobox you can have a list of cultures or strings like "en-US", "nl-BE", etc.
var culture = new CultureInfo("en-US"); // replace en-US with the selected culture or string from the combobox
CultureInfo.CurrentCulture = culture;
CultureInfo.CurrentUICulture = culture;
Also interesting to know: What is the difference between CurrentCulture and CurrentUICulture properties of CultureInfo in .NET?
-
thanls, but it's namespase doesn't present in windows 10 uap, but i found this var culture = new System.Globalization.CultureInfo("ru-RU"); // replace en-US with the selected culture or string from the combobox System.Globalization.CultureInfo.CurrentCulture = culture; System.Globalization.CultureInfo.CurrentUICulture = culture; but it's don't work for me ;( – goodniko Jan 08 '16 at 21:39