diff --git a/UI/MainUI/SOGoRootPage.m b/UI/MainUI/SOGoRootPage.m index 80952dc63..a31839864 100644 --- a/UI/MainUI/SOGoRootPage.m +++ b/UI/MainUI/SOGoRootPage.m @@ -535,6 +535,11 @@ return [[context resourceLookupLanguages] objectAtIndex: 0]; } +- (NSString *) localizedLanguage +{ + return [self labelForKey: [self language]]; +} + - (NSArray *) languages { return [[SOGoSystemDefaults sharedSystemDefaults] supportedLanguages]; diff --git a/UI/Templates/MainUI/SOGoRootPage.wox b/UI/Templates/MainUI/SOGoRootPage.wox index fbc2123e7..be037ced3 100644 --- a/UI/Templates/MainUI/SOGoRootPage.wox +++ b/UI/Templates/MainUI/SOGoRootPage.wox @@ -57,7 +57,9 @@ language - + diff --git a/UI/WebServerResources/js/Main/Main.app.js b/UI/WebServerResources/js/Main/Main.app.js index 114406fed..2bf9f9970 100644 --- a/UI/WebServerResources/js/Main/Main.app.js +++ b/UI/WebServerResources/js/Main/Main.app.js @@ -17,9 +17,11 @@ this.creds = { username: $window.cookieUsername, password: null, - language: $window.language, rememberLogin: angular.isDefined($window.cookieUsername) && $window.cookieUsername.length > 0 }; + // Send selected language only if user has changed it + if (/\blanguage=/.test($window.location.search)) + this.creds.language = $window.language; this.loginState = false; // Show login once everything is initialized