mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +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
|
@ -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…
Add table
Add a link
Reference in a new issue