I have an application which I am trying to run and display in a language other than English which is the default language. I have assigned all text to use property files and have the relevant property files translated for each language.
However, when I run the application it is all English. I have set my keyboard, language, locale all to a foreign language and it should automatically pick this up and use the relevant property file automatically, however this is not happening.
I know there is not an awful lot of information there, but if you need any more i will provide. I am running the application from Visual studio 2010, so was wandering if this could affect it.
My files :
Strings.resx
Strings.en.resx
Strings.fr.resx
My usage:
Strings.HelloWorld
Thought I would add this here: http://www.west-wind.com/weblog/posts/2009/Jun/14/WPF-Bindings-and-CurrentCulture-Formatting
Basically you add this line of code to your App.xaml:
It then overrides the default language property for every control in your application.
Thanks, Alex.
You have to get the current culture from the OS and use it as such:
Basically what you need to do is set your current culture of your application somewhere:
Related: How to set Silverlight CurrentUICulture/CurrentCulture correctly?
If it's a
WPF
app, I recommend WPFLocalizeExtension. I use it all the time, works perfect.