-
- CFStringRef locale(CFLocaleGetIdentifier(Locale_));
- setenv("LANG", [(NSString *) locale UTF8String], true);
+ Languages_ = [NSLocale preferredLanguages];
+ //CFStringRef locale(CFLocaleGetIdentifier(Locale_));
+ NSLog(@"%@", [Languages_ description]);
+ const char *lang;
+ if (Languages_ == nil || [Languages_ count] == 0)
+ lang = NULL;
+ else
+ lang = [[Languages_ objectAtIndex:0] UTF8String];
+ setenv("LANG", lang, true);
+ //std::setlocale(LC_ALL, lang);
+ NSLog(@"Setting Language: %s", lang);