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)

See Also:
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

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

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