mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-09 20:15:07 +00:00
(AppComponent) Added a note about the Angular Translate module
This commit is contained in:
parent
343d7902fa
commit
fee608cb44
|
@ -73,23 +73,35 @@ export class AppComponent implements OnInit, OnDestroy
|
|||
this._translateService.use('en');
|
||||
|
||||
/**
|
||||
* If you are using a language other than the default one, i.e. Turkish in
|
||||
* this case, you may encounter an issue where some of the components
|
||||
* are not actually being translated. In that case, switch the default language
|
||||
* back and forth to overcome this issue.
|
||||
* This is related to Angular Translate module and it's a temporary fix while
|
||||
* we are moving the multi language implementation over to the Angular's core
|
||||
* language service.
|
||||
* ------------------------------------------------------------------
|
||||
* ngxTranslate Fix Start
|
||||
* ------------------------------------------------------------------
|
||||
* If you are using a language other than the default one, i.e. Turkish in this case,
|
||||
* you may encounter an issue where some of the components are not actually being
|
||||
* translated when your app first initialized.
|
||||
*
|
||||
* This is related to ngxTranslate module and below there is a temporary fix while we
|
||||
* are moving the multi language implementation over to the Angular's core language
|
||||
* service.
|
||||
**/
|
||||
|
||||
// Set the default language to 'en' and then back to 'tr'.
|
||||
// '.use' cannot be used here as ngxTranslate won't switch to a language that's already
|
||||
// been selected and there is no way to force it, so we overcome the issue by switching
|
||||
// the default language back and forth.
|
||||
/**
|
||||
// Set the default language to 'en' and then back to 'tr' to fix the translation issues
|
||||
setTimeout(() => {
|
||||
this._translateService.setDefaultLang('en');
|
||||
this._translateService.setDefaultLang('tr');
|
||||
});
|
||||
*/
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------
|
||||
* ngxTranslate Fix End
|
||||
* ------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Add is-mobile class to the body if the platform is mobile
|
||||
if ( this._platform.ANDROID || this._platform.IOS )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user