diff options
Diffstat (limited to 'rulemgt-frontend/src/app/app.component.ts')
-rw-r--r-- | rulemgt-frontend/src/app/app.component.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rulemgt-frontend/src/app/app.component.ts b/rulemgt-frontend/src/app/app.component.ts index 29bf86b..dbb5b62 100644 --- a/rulemgt-frontend/src/app/app.component.ts +++ b/rulemgt-frontend/src/app/app.component.ts @@ -27,17 +27,17 @@ export class AppComponent implements OnInit { if (rtnLanguage == 'null' || rtnLanguage == null) { rtnLanguage = window.navigator.language; } - if (rtnLanguage.startsWith('en')) { - return 'en'; - } else { + if (rtnLanguage.startsWith('zh')) { return 'zh'; + } else { + return 'en'; } } ngOnInit(): void { this.translate.addLangs(['en', 'zh']); - this.translate.setDefaultLang('zh'); + this.translate.setDefaultLang('en'); let language = this.getLanguage(); this.translate.use(language); } -}
\ No newline at end of file +} |