mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 08:02:55 +00:00
fix: setting of default language
This commit is contained in:
@@ -66,10 +66,9 @@ export class AppComponent {
|
||||
private readonly configProvider: ConfigProvider,
|
||||
private readonly logger: NGXLogger) {
|
||||
initLogger(logger);
|
||||
this.initializeApp();
|
||||
|
||||
// this language will be used as a fallback when a translation isn't found in the current language
|
||||
translateService.setDefaultLang('en');
|
||||
this.translateService.setDefaultLang('en');
|
||||
this.initializeApp();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,6 +105,9 @@ export class AppComponent {
|
||||
|
||||
try {
|
||||
// set language from settings
|
||||
if (this.configProvider.firstSession) {
|
||||
await this.settingsProvider.setSettingValue('profile', 'language', this.translateService.getBrowserLang());
|
||||
}
|
||||
const languageCode = (await this.settingsProvider.getValue('profile', 'language')) as string;
|
||||
this.thingTranslateService.translator.language = languageCode as SCLanguageCode;
|
||||
this.translateService.use(languageCode);
|
||||
|
||||
Reference in New Issue
Block a user