From bb347c4c58cfcd72dd17be9eeb2fcb8c813140b9 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 15 Feb 2017 14:09:30 -0800 Subject: [PATCH] Make an executive decision to not support regions. --- MobileCydia.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 47033741..a10181d2 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 += ","; } -- 2.45.2