mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
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:
parent
0c38367075
commit
8970541166
2 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue