Improve iOS region string (thanks @maaniv!)
This commit is contained in:
@@ -16,7 +16,10 @@ namespace lime {
|
|||||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NSString* locale = [[NSLocale currentLocale] localeIdentifier];
|
NSString* localeLanguage = [[NSLocale preferredLanguages] firstObject];
|
||||||
|
NSString* localeRegion = [[NSLocale currentLocale] countryCode];
|
||||||
|
NSString* locale = [[localeLanguage stringByAppendingString:@"_"] stringByAppendingString:localeRegion];
|
||||||
|
|
||||||
std::string* result = 0;
|
std::string* result = 0;
|
||||||
|
|
||||||
if (locale) {
|
if (locale) {
|
||||||
|
|||||||
Reference in New Issue
Block a user