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
+1
View File
@@ -17,6 +17,7 @@ Bug fixes
- fixed freebusy data when 'busy off hours' is enabled and period starts during the weekend
- fixed fetching of freebusy data from the Web interface
- fixed EAS handling of Bcc in emails (#3138)
- fixed Language-Region tags in Web interface (#3121)
2.2.16 (2015-02-12)
-------------------
+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
+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