summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm6
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 += ",";
}