diff options
author | Guangrong Fu <fu.guangrong@zte.com.cn> | 2021-12-06 19:45:35 +0800 |
---|---|---|
committer | Guangrong Fu <fu.guangrong@zte.com.cn> | 2021-12-06 19:48:02 +0800 |
commit | 9cb232b82f78e33f8cca472f733189ee6c13e52c (patch) | |
tree | e4545afba8f08527053373dae576afbda01d5e8d /rulemgt-frontend | |
parent | 942ce2677d26169697f75f136e2b6f4c0e6ab147 (diff) |
bugfix - make English the default language for UI
Issue-ID: HOLMES-499
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Change-Id: Idac9001e1395d2e6c38dada2c5f506ab1f78cf60
Diffstat (limited to 'rulemgt-frontend')
-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 +} |