diff --git a/ChangeLog b/ChangeLog index bfcf6d339..19a9a20fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-26 Adam Fedor + + * Source/NSUserDefaults.m (+userLanguages): On MingW systems, check + locale for language name. + 2001-06-26 Richard Frith-Macdonald * Source/NSSerializer.m: While deserializing, check strings to see diff --git a/Source/NSUserDefaults.m b/Source/NSUserDefaults.m index 98e7e6034..bc8afea03 100644 --- a/Source/NSUserDefaults.m +++ b/Source/NSUserDefaults.m @@ -358,6 +358,15 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */ { currLang = [NSArray arrayWithObject: GSLanguageFromLocale(locale)]; } +#ifdef __MINGW__ + if (currLang == nil && locale != 0) + { + /* Check for language as the first part of the locale string */ + NSRange under = [locale rangeOfString: @"_"]; + if (under.location) + currLang = [locale substringToIndex: under.location]; + } +#endif if (currLang == nil) { const char *env_list;