Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=15214
This is a regression introduced in
be532638.
Xamarin.Android assumes that the $LANG environment variable can be
used to control System.Globalization.CultureInfo.CurrentCulture,
setting LANG based on the current Java locale.
This was broken in
be532638 because $LANG was no longer being checked
to determine the default locale, as $LC_ALL was not set.
Fix the fallback logic so that $LANG is checked when $LC_ALL is not.
const char *locale;
locale = g_getenv ("LC_ALL");
- if (locale != NULL){
+ if (locale == NULL) {
locale = g_getenv ("LANG");
if (locale == NULL)
locale = setlocale (LC_ALL, NULL);