Check for language in locale on MingW

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10264 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-06-27 03:13:33 +00:00
parent 0c38367075
commit 8970541166
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2001-06-26 Adam Fedor <fedor@gnu.org>
* Source/NSUserDefaults.m (+userLanguages): On MingW systems, check
locale for language name.
2001-06-26 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSSerializer.m: While deserializing, check strings to see

View file

@ -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;