mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
i18n fixes (#3018)
This commit is contained in:
@@ -75,6 +75,7 @@ export class TranslationService {
|
||||
this.translate.getTranslation(this.userLang).subscribe(
|
||||
() => {
|
||||
this.translate.use(this.userLang);
|
||||
this.onTranslationChanged(this.userLang);
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -82,12 +83,20 @@ export class TranslationService {
|
||||
this.translate.getTranslation(this.userLang).subscribe(
|
||||
() => {
|
||||
this.translate.use(this.userLang);
|
||||
this.onTranslationChanged(this.userLang);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private onTranslationChanged(lang: string): void {
|
||||
this.translate.onTranslationChange.next({
|
||||
lang: lang,
|
||||
translations: this.customLoader.getFullTranslationJSON(lang)
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the target language for translations.
|
||||
* @param lang Code name for the language
|
||||
|
Reference in New Issue
Block a user