mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
i18n fixes (#1614)
* i18n fixes - fix issue with default (fallback) language set to browser language - fix issue with fallback language loading when browser language set to non-English locale * code and UI fixes - move document list i18n strings into own scope - replace MDL menu with @angular/material menu (fixes issue with menu items translation, not supported by MDL) - minor improvements * fix unit tests * improve i18n docs and code - provide basic documentation for Translation service - remove custom Login component localisation in favour of documentation sample - simplified i18n setup for demo shell (single path for dev/prod env) * remove unnecessary comments
This commit is contained in:
committed by
Mario Romano
parent
8edd2a2d23
commit
07bad77547
@@ -39,14 +39,14 @@
|
||||
<span class="flag-icon flag-icon-gb"></span>
|
||||
<label tabindex="0"> English</label>
|
||||
</a>
|
||||
<a class="mdl-navigation__link" (click)="changeLanguage('gr')">
|
||||
<span class="flag-icon flag-icon-gr"></span>
|
||||
<label tabindex="0"> Greek</label>
|
||||
</a>
|
||||
<a class="mdl-navigation__link" (click)="changeLanguage('it')">
|
||||
<span class="flag-icon flag-icon-it"></span>
|
||||
<label tabindex="0"> Italian</label>
|
||||
</a>
|
||||
<a class="mdl-navigation__link" (click)="changeLanguage('ru')">
|
||||
<span class="flag-icon flag-icon-ru"></span>
|
||||
<label tabindex="0"> Russian</label>
|
||||
</a>
|
||||
</nav>
|
||||
<span class="mdl-layout-title">Components</span>
|
||||
<nav class="mdl-navigation">
|
||||
|
@@ -43,13 +43,7 @@ export class AppComponent {
|
||||
this.setProvider();
|
||||
|
||||
if (translateService) {
|
||||
if (process.env.ENV === 'production') {
|
||||
translateService.addTranslationFolder('custom', 'i18n/custom-translation');
|
||||
translateService.addTranslationFolder('ng2-alfresco-login', 'i18n/custom-translation/alfresco-login');
|
||||
} else {
|
||||
translateService.addTranslationFolder('custom', 'custom-translation');
|
||||
translateService.addTranslationFolder('ng2-alfresco-login', 'custom-translation/alfresco-login');
|
||||
}
|
||||
translateService.addTranslationFolder('app', 'resources');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +69,7 @@ export class AppComponent {
|
||||
);
|
||||
}
|
||||
|
||||
navigateToLogin(){
|
||||
navigateToLogin() {
|
||||
this.router.navigate(['/login']);
|
||||
this.hideDrawer();
|
||||
}
|
||||
|
Reference in New Issue
Block a user