diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-26 00:26:00 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:22 -0800 |
commit | 25fdc94109ecac40ff45dff9a176180806c151e6 (patch) | |
tree | c46477a399a8aff121c59aabc0fae47acc18c34e | |
parent | 8e5b801a1f64082e19ad37537d9f5f3d56d8bdd1 (diff) |
Use localeIdentifier instead of preferredLanguages for LC_MESSAGES (worse, yet better).
-rw-r--r-- | MobileCydia.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 970239b..9448e64 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -10054,11 +10054,14 @@ int main(int argc, char *argv[]) { _pooled /* Set Locale {{{ */ Locale_ = CFLocaleCopyCurrent(); Languages_ = [NSLocale preferredLanguages]; + //CFStringRef locale(CFLocaleGetIdentifier(Locale_)); //NSLog(@"%@", [Languages_ description]); const char *lang; - if (Languages_ == nil || [Languages_ count] == 0) + if (Locale_ != NULL) + lang = [(NSString *) CFLocaleGetIdentifier(Locale_) UTF8String]; + else if (Languages_ == nil || [Languages_ count] == 0) // XXX: consider just setting to C and then falling through? lang = NULL; else { |