Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 8981 [details]
Sample project that shows CurrentCulture on labels
The CurrentCulture property is returning the incorrect value on iOS7.1 devices. If you set the device Language from English to German it will still return a English value.
I have attached a simple sample project which verifies this behavior.
Steps to reproduce:
1. Grab a device running iOS7.1
2. Go to Settings -> General -> Language & Region -> Language. Change to Deutsch (German)
3. Run the sample code
4. Confirm that the following code is returning "en-US" instead of "de-DE"
> 2. Go to Settings -> General -> Language & Region -> Language.
That does not sound right. In iOS 7.1 you have:
> Settings -> General -> International -> Language
What you're showing looks like iOS 8.x options.
But I do see
if I run this in a German iOS 7.1 device.
The first two (.net) properties are build from the value returned from iOS' `NSLocale.CurrentLocale`. If iOS returns an incorrect value then the .net values will be wrong.
I'll confirm with an ObjC app but it really looks like an iOS issue.
note: 99% of our bindings are direct mapping to iOS API, i.e. there's no version checks or alterations of results.
2014-12-05 14:30:23.440 culture25112[7969:607] Cannot find executable for CFBundle 0x7b770d30 </Applications/Xcode62-beta1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
2014-12-05 14:30:23.587 culture25112[7969:607] Language: en_US
2014-12-05 14:36:59.270 culture25112[8246:60b] Language: en_CA <- that's because of how my country, not language is set
I get the same issue with Xcode/ObjC (both using the simulator and on device), i.e. it's an iOS issue.
It seems that only the collation is being set to "de", not the rest of the properties. That could be used as a workaround, i.e. check the collation and then switch the Thread.CurrentThread.CurrentCulture to match.