Bug 33400 - Setting Language to zh-Hant on iOS does not set UICulture to zh-TW or zh-Hant
Summary: Setting Language to zh-Hant on iOS does not set UICulture to zh-TW or zh-Hant
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries ()
Version: XI 8.10
Hardware: Macintosh Other
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2015-08-26 13:33 UTC by Tom Philpot
Modified: 2015-09-02 04:58 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Sample project. (14.27 KB, application/zip)
2015-08-26 13:33 UTC, Tom Philpot
Test app screenshot on iPhone 4S iOS 8.4 simulator (61.25 KB, image/png)
2015-08-26 13:41 UTC, Tom Philpot

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Tom Philpot 2015-08-26 13:33:22 UTC
Created attachment 12650 [details]
Sample project.

When setting the preferred language to "Chinese, Traditional", I would expect that the CurrentCulture and CurrentUICulture properties would be set to "zh-Hant" or "zh-TW". Instead, they are always set to "zh-CN".

This makes it difficult to use traditional Chinese localizations from a Resources.zh-TW.resx or Resources.zh-Hant.resx file.

See the attached Xamarin.iOS sample project that exhibits the behavior.

Repro Steps:
1. Open the iPad simulator
2. Set the preferred Language to "Chinese, Traditional"
3. Run the attached Xamarin.iOS project.

Expected Behavior:

CurrentUICulture and CurrentCulture should be set to Chinese (Traditional), not Chinese (Simplified)
Comment 1 Tom Philpot 2015-08-26 13:41:11 UTC
Created attachment 12651 [details]
Test app screenshot on iPhone 4S iOS 8.4 simulator
Comment 2 Tom Philpot 2015-08-26 13:53:30 UTC
In the uploaded screenshot the region code was still set to United States.

Setting the region code to "China" makes no difference in the output of the managed code, other than properly setting the NSLocale to "zh-Hant_CN"
Comment 3 Tom Philpot 2015-08-26 14:16:50 UTC
This appears to do what is expected if the region is set to TW as well as setting the Language to "Chinese, Traditional"
Comment 4 Tom Philpot 2015-09-01 17:20:55 UTC
I'm not convinced there's actually a bug here. I don't actually know how common it might be to have a user set the Region to China and expect Chinese Traditional. I guess seeing what .NET 4.5 or 4.6 does would probably be a better validation of what this *should* do.
Comment 5 Marek Safar 2015-09-02 04:58:47 UTC
Fixed in master and mono 4.2 branch