Respect languages preferences on login page

Fixes #4169
This commit is contained in:
Francis Lachapelle
2017-05-31 10:48:35 -04:00
parent 678cf66a57
commit e73a3495bb
7 changed files with 45 additions and 10 deletions
+2
View File
@@ -31,6 +31,8 @@
NSString *cookieLogin;
}
- (NSArray *) languages;
@end
#endif /* SOGOROOTPAGE_H */
+10
View File
@@ -521,6 +521,16 @@
return item;
}
- (BOOL) hasManyLanguages
{
return [[self languages] count] > 1;
}
- (NSString *) language
{
return [[context resourceLookupLanguages] objectAtIndex: 0];
}
- (NSArray *) languages
{
return [[SOGoSystemDefaults sharedSystemDefaults] supportedLanguages];