views:

41

answers:

2

I am trying to localize an app in Dutch, but the emulator doesn't seem to pick up and recognize the Dutch versions of my resource strings.

I have a base Strings.resx file with the english translations. Then, I have Strings.nl.resx with the Dutch translations. I also have Strings.es.resx, Strings.fr.resx, and Strings.it.resx.

When I change the emulator's language to Spanish, French, or Italian, it picks up those translations, but when I switch to Dutch, it uses the English translations. Am I using the right character code for the Dutch translations?

+1  A: 

Windows Phone 7 only supports English, French, Italian, German and Spanish at the moment.

When you choose the display language in the emulator, the choices are "Deutsch, English (UK), English (US), Espanol, Francais, Italiano" (plus the accents that I'm too lazy to type in).

Basically, I don't think you should be trying to localize the application to Dutch at the moment. I dare say a future revision of the platform will include more languages.

Having said that, you can set the "region format" to Dutch... I'm not sure how that's represented in the CultureInfo... I'll investigate.

EDIT: I've just tried setting my language to English (UK) but my region format to Dutch (Netherlands). I end up with a CultureInfo.CurrentCulture of "nl-NL" but a CultureInfo.CurrentUICulture of "en-GB". I believe it's the latter which is used to load resources by default. So you probably could explicitly load the resources based on the CurrentCulture instead, but I suspect it's not a good idea.

Jon Skeet
That's odd, I am loading resources based on CurrentCulture and not CurrentUICulture. I think this was what the xna localization sample did, but I couldn't check since the samples were down last time I tried. I will repeat your experiment and see if I can investigate further - this may just be a WP7 bug too.
Jeremy Bell
A: 

nl is the right code but I wonder if it's due to Dutch not being a supported language.
Devices also won't be available in The Netherlands so it begs the question why you have the translation anyway.

Matt Lacey