Why does localization with resx files fail with ZH (chinese) only?

Posted by Trey Carroll on Stack Overflow See other posts from Stack Overflow or by Trey Carroll
Published on 2010-06-10T03:26:27Z Indexed on 2010/06/10 3:33 UTC
Read the original article Hit count: 363

Howdy All,

I've been tasked with localizing an English language ASP.NET MVC 2.0 website into 7 additional languages. I've added resource files to the Views > Home > App_LocalResources folder:

Example:

Index.resx, Index.es.resx, Index.fr.resx, Index.zh.resx, etc.

I have set the CustomTool to PublicResXFileCodeGenerator (Access modifier is Public), Set file as an Embedded Resource, Set a Custom Tool Namespace.

The keys ("Name") in all of the files are the same.

For 7 languages this works perfectly. If I go into IE 8 settings and change the language to de,fr,it, etc., the page shows the appropriate translated strings. However, when I set the language in the Browser to any of the zh (Simplified Chinese) variants localization completely fails and the English strings are displayed. Is there something special about Simplified Chinese? Japanese and Korean work without problems.

TIA,

Trey Carroll

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about localization