mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-27 05:57:04 +00:00
Fixed: CPLocal can't handle unknown language codes
When the language code is not known it still sets the current language code to the unknown code instead of the defualt 'en_US' code. This makes the test cases for CPDateFormatter fail when run on a foreign system.
This commit is contained in:
@@ -101,7 +101,7 @@ var sharedSystemLocale = nil,
|
||||
|
||||
language = [CPString stringWithFormat:@"%s_%s", [language lowercaseString], [language uppercaseString]];
|
||||
|
||||
if ([availableLocaleIdentifiers indexOfObject:language])
|
||||
if ([availableLocaleIdentifiers indexOfObject:language] !== CPNotFound)
|
||||
localeIdentifier = language;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user