mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix search and login
This commit is contained in:
@@ -78,7 +78,6 @@ export class AlfrescoLoginComponent {
|
||||
'required': 'LOGIN.MESSAGES.PASSWORD-REQUIRED'
|
||||
}
|
||||
};
|
||||
this.translationInit(translate);
|
||||
|
||||
this.form.valueChanges.subscribe(data => this.onValueChanged(data));
|
||||
|
||||
@@ -156,19 +155,4 @@ export class AlfrescoLoginComponent {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initial configuration for Multi language
|
||||
* @param translate
|
||||
*/
|
||||
translationInit(translate: TranslateService) {
|
||||
this.translate = translate;
|
||||
let userLang = navigator.language.split('-')[0]; // use navigator lang if available
|
||||
userLang = /(fr|en)/gi.test(userLang) ? userLang : 'en';
|
||||
|
||||
this.translate.setDefaultLang(userLang);
|
||||
this.translate.currentLoader.addComponentList('node_modules/ng2-alfresco-login');
|
||||
this.translate.getTranslation(userLang);
|
||||
this.translate.use(userLang);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user