diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2017-02-15 14:09:30 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2017-02-15 14:09:30 -0800 |
commit | bb347c4c58cfcd72dd17be9eeb2fcb8c813140b9 (patch) | |
tree | 82fe6bc455d25bda7bd6b493c5a146afb9df9404 | |
parent | 5ddde60fb69b9b9d2466044e208977981d2e1fcb (diff) |
Make an executive decision to not support regions.
-rw-r--r-- | MobileCydia.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 4703374..a10181d 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -10273,7 +10273,11 @@ int main(int argc, char *argv[]) { } if (Languages_ != nil) - for (NSString *language : Languages_) { + for (NSString *locale : Languages_) { + auto components([NSLocale componentsFromLocaleIdentifier:locale]); + NSString *language([components objectForKey:(id)kCFLocaleLanguageCode]); + if (NSString *script = [components objectForKey:(id)kCFLocaleScriptCode]) + language = [NSString stringWithFormat:@"%@-%@", language, script]; languages += [language UTF8String]; languages += ","; } |