Wednesday, August 22, 2012 1:35 PM
Hi, I am developing metro style apps with xaml + c#. Now I hope to get locale of the metro system based on user's language settings. Such as EN-US, JA-JP.
The method I use is CultureInfo.CurrentCulture.Name. When I set language to EN, it will return en-us. But when I set language to Japanese, it will return ja instead of JA-JP.
As I hope to generate en-us, ja-jp format string, how could I get that?
Thanks in advance.
Wednesday, August 22, 2012 1:50 PM
You can use...
This will pull the default language from their user profile.
Or you can use...
This will pull the language they currently have set. (you can set this from the desktop app in the tasks bar if you have multiple languages defined)
Thursday, August 23, 2012 1:25 AM
Hi, thanks for your reply. I tried
but it will still return JA instead of JA-JP, I hope to generate JA-JP, EN-US format strings, any ideas?
Thursday, August 23, 2012 1:48 PM
I hadn't tested it with JA. It's odd because it returns the full format on the others...
I did notice that when you select Japanese there is only one option instead of multiple options like the other languages. Not sure what other languages are like that.
Some more help might be coming from Matt if you watch this thread...
- Marked As Answer by Vicky SongModerator Monday, September 10, 2012 7:44 AM
Thursday, August 23, 2012 9:23 PM
This scenario is not unique to Japanese, there are other language examples. Are there country specific variants of the Japanese language do you think?