Bug 15840 - Add a new locale info for de-FR
Summary: Add a new locale info for de-FR
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2013-10-31 04:26 UTC by David PIHAN
Modified: 2013-11-04 09:34 UTC (History)
4 users (show)

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

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 on GitHub or Developer Community 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.

Related Links:

Description David PIHAN 2013-10-31 04:26:24 UTC
If the mobile phone is set in de-FR (I see "German (Frankreich)" in the Android language settings) (HTC One SV bought in France with a french ROM but with German selected as a language), an invariant culture is automaticaly selected (see bug 15214). 

Is it possible to add "de-FR" as a new culture 
or to select "de" which exists in the cultures supported by mono 
or more generally when the full culture in 4 chars (xx-YY) is not supported to select the culture in 2 chars (xx) if supported ?

Thanks in advance,
Comment 1 Marek Safar 2013-11-01 03:15:07 UTC
de-FR is not .NET supported culture. However, when you try to create it Mono fallbacks automatically to de-DE.

Simple way to test it is

		var ci = CultureInfo.CreateSpecificCulture ("de-FR");
		Console.WriteLine (ci);
Comment 2 Jonathan Pryor 2013-11-01 09:11:20 UTC
@Marek: That doesn't help for default cultures. On Unixy platforms (e.g. Linux, Android), the default locale is pulled from $LANG and $LC_ALL:


The $LANG/$LC_ALL value is used with construct_culture_from_specific_name(), which fails (there's no de-FR data):


Since it fails, CultureInfo falls back to the Invariant culture:


If adding de-FR data isn't "correct", how can we best support this scenario (using a "correct" fallback locale based on $LANG)? Should construct_culture_from_specific_name() do the fallback detection?
Comment 3 David PIHAN 2013-11-04 03:41:12 UTC
Hi Marek,
Thank you for your analyze but as Jonathan wrotte if you can return "de-DE" when "de-FR" is selected in the system it will be great for me. The problem is the invariant.
I hope you can find a solution.
Best regards,
Comment 4 Jonathan Pryor 2013-11-04 09:34:30 UTC
Improved fallback support has been filed as Bug #15875.