Fix Language-Region tags in Web interface

Fixes #3121
This commit is contained in:
Francis Lachapelle
2015-03-19 08:32:37 -04:00
parent cdb766e2ef
commit 69974807b5
3 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -82,7 +82,9 @@
- (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: @"-"];
}
- (NSArray *) monthMenuItems