Multilingual applciation

R

romain taillandier

Hi group,

I have to make a multilingual application on my device WM 5.0

I make the Form, set the localisable to true, change the language, and
make the (aproximate) translation. I get 2 resx file, one MyForm.resx
(default language), and the second MyForm.en.resx (english).
the designer code have construct a lot of
resources.ApplyResources(this.menuItem1, "menuItem1");
very good.

When i change in the designer the language (to default), all the form
is reconstruct, and i am back to french. nice.
When i deploy i get a new \MyApp\en\ directory with MyApp.resources.dll
good.

I had a 'Language' menu, to dynamically (runtime) change the language
of the form, and here i don't undestand how to achieve this !

I try a lot arround, ResourceManager, ComponentResourceManager, but my
app is still in french (runtime), ApplyResources using CultureInfo ...

I have found example, wich reconstruct every controls of the form, by
calling the GetString("MyProp",MyCulture) like this one
http://www.codeproject.com/csharp/formlanguageswitch.asp
But i am quite sure that all is automated since i use the good
strategy, I don't want to copy-past InitializeComponent(Culture c), to
remake my form.

Please light me on the last step, i am sure i am near te success.

thanks
ROM
 
S

Simon Hart

Unfortunately even with CF2.0 you can't change the culture code during
runtime. The System.Threading.Thread.CurrentUICulture and
System.Threading.Thread.CurrentCulture are not supported, and
CurrentInfo.CurrentUICulture is a read only property.

The only way would be to use satalite assemblies and handle the loading and
unloading of these assemblies using Reflection - a little messy though.

Regards
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