Fix Language-Region tags in Web interface

Fixes #3121
This commit is contained in:
Francis Lachapelle
2015-03-19 08:32:37 -04:00
committed by Ludovic Marcotte
parent d82f05de75
commit 4e68ec9d52
3 changed files with 7 additions and 2 deletions

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