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.