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
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries (show other bugs)
Version: XI 8.10
Hardware: Macintosh Other
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-08-26 13:33 UTC by Tom Philpot
Modified: 2015-09-02 04:58 UTC (History)
4 users (show)

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


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

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

Note You need to log in before you can comment on or make changes to this bug.