Support for multiple language resources

G

Guest

Is there any way to switch cultures at run time in the CF 2.0? None of the
methods which work with the standard framework seem to work with the compact
version. Basically what I am trying to do is create multiple .resx files
such as "strings.en.resx" and "Strings.de.resx" and then access them with
ResourceMaganger.GetString("MyString", MyCultureInfo) calls.
 
S

Simon Hart

Unfortunately CF1 and 2 does not support Thread.CurrentThread.CurrentCulture
so you can't force a culture as you would normally.

I have never tried this but have you tried something like the following:
ResourceManager rm = new ResourceManager("Resources.AppStrings.de",
Assembly.GetExecutingAssembly());

To force the load of the german culture.

Simon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top