Saturday, February 18, 2012

Issue with Chinese (zh) and Windows Phone

(FYI: I'm speaking about the Windows Phone SDK 7.1, these information can change...)

For my first Windows Phone application, I had an issue with the Chinese language... In the ASP.NET MVC version, I use a resource file like this BlindFriendsResource.zh.resx and that works!

So I wanted to keep the same file for the mobile version and... the application was launched in its default language (English).

After some research, I found the solution! I created two files: BlindFriendsResource.zh-CN.resx (Simplified) and BlindFriendsResource.zh-TW (Traditional). These two files correspond to the both supported  languages in Windows Phone.

Using "zh" only will not work for the Chinese language but using "fr" will work for a belgian  person (French speaker: fr-BE) or a french person (fr-FR)... So, finaly, you can see here the list of my resources files:

- BlindFriendsResource.resx
- BlindFriendsResource.es.resx
- BlindFriendsResource.fr.resx
- BlindFriendsResource.nl.resx
- BlindFriendsResource.pt.resx
- BlindFriendsResource.zh-CN.resx
- BlindFriendsResource.zh-TW.resx

I hope that information can be useful for someone ;-)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.