We recently localised our WPF application for the Chinese market, including both a default (English) string resource file “Resources.resx”, and a Simplified Chinese version “Resources.zh-HANS.resx”. The software correctly translates the on-screen text when running on customer PCs in China.
However I’ve noticed that Thread.CurrentThread.CurrentUICulture.Name
is being reported as zh-CN and not zh-HANS, which I perhaps naively assumed it would be. Why is this? It came to my attention because there is some code that performs different functions depending on the culture, but is failing on Chinese PCs because it is expecting this to be “zh-HANS”.
Also, how is .Net still able to serve up strings from the “Resources.zh-Hans.resx” file – is it simply falling back to match on the first part (“zh”) because it doesn’t find a zh-CN file?
1