Fix Language-Region tags in Web interface

Fixes #3121
This commit is contained in:
Francis Lachapelle committed 2015-03-19 08:35:10 -04:00
1 parent cdb766e2ef
commit 69974807b5
3 files changed
+7 -2

No files matched your search

+3 -1
View File
@@ -230,7 +230,9 @@ static NSArray *infoKeys = nil;
- (NSString *) localeCode
{
// WARNING : NSLocaleCode is not defined in <Foundation/NSUserDefaults.h>
return [locale objectForKey: @"NSLocaleCode"];
// Region subtag must be separated by a dash
NSString *s = [locale objectForKey: @"NSLocaleCode"];
return [s stringByReplacingOccurrencesOfString: @"_" withString: @"-"];
}
- (void) setFrom: (NSString *) newFrom