zh invariant chinese culture 

Friday, July 30, 2010 7:48:14 AM

I just ran into a problem with auto generated Resource Classes for .resx files in the App_GlobalResources folder. By default the runtime generates Proxy classes to access the content of neutral sample.resx files by code. If you add other languages (e.g. German like sample.de.resx) this file is recognized as a language specific version of the neutral file and no proxy is generated. This is fine.

Problem: If you add a sample.zh.resx for the Chinese version you get an error "...already contains a definition for..." because there is no invariant zh culture! So the runtime tries to generate a neutral proxy...for most languages there is an invariant version (http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28VS.71%29.aspx) but not for Chinese. You have to choose a specific culture instead. e.g. zh-CHS for traditional Chinese.



re: zh invariant chinese culture

Monday, August 02, 2010 10:40:26 AM Florian Morrenth

Eh klor! Works for all defined cultures (invariant or specific). But who would have thought that there is no default chinese language? Not even after having been to China :-)


re: zh invariant chinese culture

Monday, August 02, 2010 9:08:34 AM Marcus Meisel

So that does work for de-at, de-ch, de-de anyways I assume.

lg,

Marcus


Comments are closed on this post.

 
Site Map | Printable View | Design by creative & it consulting | © 2009 - 2012 Florian Morrenth