mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-03 05:11:17 +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
46c8e4f481
commit
750d92e516
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>
|
2001-06-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSSerializer.m: While deserializing, check strings to see
|
* 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)];
|
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)
|
if (currLang == nil)
|
||||||
{
|
{
|
||||||
const char *env_list;
|
const char *env_list;
|
||||||
|
|
Loading…
Reference in a new issue