Bug 52334 - CultureInfo.CurrentUICulture does not return the correct language code
Summary: CultureInfo.CurrentUICulture does not return the correct language code
Status: CONFIRMED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) (show other bugs)
Version: Master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Manuel de la Peña
URL:
: 59415 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-06 19:11 UTC by Yvonne Du
Modified: 2017-09-13 16:13 UTC (History)
5 users (show)

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


Attachments

Description Yvonne Du 2017-02-06 19:11:07 UTC
On OS 10.12, I set the language to Chinese Traditional Taiwan, the API CultureInfo.CurrentUICulture returns zh-HK.

While native Apple API NSLocale can return correct value as zh-Hant-TW
Comment 1 Manuel de la Peña 2017-02-08 09:37:05 UTC
Do you have a simple way to test this? Would be nice to reproduce this in a testable manner?
Comment 2 Timothy Risi 2017-03-13 19:02:11 UTC
I was able to test this by changing the language on the siulator and calling the specified APIS:

Console.WriteLine (CultureInfo.CurrentUICulture);
Console.WriteLine (NSLocale.CurrentLocale.LocaleIdentifier);

The same difference occurs for Traditional Chinese (Hong Kong), CurrentUICulture simply shows zh-HK same as traditional Taiwan (can't actually test taiwan as it doesn't appear to be an option in my simulator).
Comment 3 Timothy Risi 2017-03-13 19:39:13 UTC
Whoops, just realized this was a mac bug and I tested on iOS.  Tested on mac now (set machine to traditional chinese taiwan) and saw the same error there.

So looks like it affects both iOS and mac.
Comment 4 Alex Soto [MSFT] 2017-09-13 16:13:37 UTC
*** Bug 59415 has been marked as a duplicate of this bug. ***

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