Bug 43737 - Unsupported language codes in .NET
Summary: Unsupported language codes in .NET
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: General (show other bugs)
Version: XI 9.8 (tvOS / C7)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-25 08:50 UTC by Adam Hartley [MSFT]
Modified: 2016-08-30 07:05 UTC (History)
4 users (show)

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


Attachments
Sample (9.99 KB, application/zip)
2016-08-25 08:50 UTC, Adam Hartley [MSFT]
Details


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 for Bug 43737 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Adam Hartley [MSFT] 2016-08-25 08:50:27 UTC
Created attachment 17210 [details]
Sample

iOS supports many languages that appear to not be supported in .NET, so when one of these is in use by the end user it is not possible to localise the app automatically by using an appropriate resx file.

## Steps to reproduce

1. Set iPhone language to Schwiizertüütsch
2. Build and run sample app

The sample app simply outputs the following:

NSLocale.AutoUpdatingCurrentLocale.LocaleIdentifier
NSLocale.AutoUpdatingCurrentLocale.LanguageCode
Thread.CurrentThread.CurrentCulture

## Expected result

Output as follows:

gsw_US
gsw
gsw-US

## Actual result

gsw_US
gsw
*blank*

## Notes

This can be worked around by doing the following:

https://github.com/conceptdev/xamarin-forms-samples/blob/master/TodoL10nResx/PCL/Todo.iOS/Locale_iOS.cs#L53-L56