mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Improved AlfrescoTranslationService
This commit is contained in:
@@ -79,10 +79,10 @@ export class AppComponent {
|
||||
let userLang = navigator.language.split('-')[0]; // use navigator lang if available
|
||||
userLang = /(fr|en)/gi.test(userLang) ? userLang : 'en';
|
||||
|
||||
// this language will be used as a fallback when a translation isn't found in the current language
|
||||
this.translate.setDefaultLang('en');
|
||||
|
||||
// the lang to use, if the lang isn't available, it will use the current loader to get them
|
||||
this.translate.currentLoader.addComponentList('');
|
||||
this.translate.getTranslation(userLang);
|
||||
this.translate.use(userLang);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user