Question

I have 3 ressource files : AppRessources.resx, AppRessources.fr.resx, AppRessources.nl.resx.

I add to my page a ListPicker (it's a combobox) that has 3 languages (English, French and Dutch).

When an item is selected, I change the CurrentCulture and the CurrentUICulture. It works for French and Dutch but not for English...

When English is selected, I think the application doesn't load the default AppRessource...

Do you know how can I resolve this problem?

Thank you in advance,

My code :

switch (selectedIndex)
{
//French
case 0:
    Thread.CurrentThread.CurrentCulture = new CultureInfo("fr");
    Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr");
    break;
//English
case 1:
    Thread.CurrentThread.CurrentCulture = new CultureInfo("en");
    Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
    break;
//Dutch
case 2:
    Thread.CurrentThread.CurrentCulture = new CultureInfo("nl");
    Thread.CurrentThread.CurrentUICulture = new CultureInfo("nl");
    break;
}
Was it helpful?

Solution

What if you change "en" to "en-US"? I think the default locale is en-US not en.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top