mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-03 12:52:16 +00:00
feat: internationalization Polish (#5117)
* Add Polish translations * Add references to Polish translations in files * Make a consistent translation of languages in Chinese translation * Add missing language references to fr, it and zh * Translation corrections * Add missing language references to zh * Translation corrections * add latest translation keys * Translation corrections and addition of some new ones * translate auth requests exhausted * add new untranslated keys * Translation corrections, fix indentation --------- Co-authored-by: Elio Bischof <[email protected]>
This commit is contained in:
@@ -262,15 +262,15 @@ export class AppComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
private setLanguage(): void {
|
||||
this.translate.addLangs(['en', 'de', 'zh']);
|
||||
this.translate.addLangs(['en', 'de', 'fr', 'it', 'pl', 'zh']);
|
||||
this.translate.setDefaultLang('en');
|
||||
|
||||
this.authService.user.subscribe((userprofile) => {
|
||||
if (userprofile) {
|
||||
const cropped = navigator.language.split('-')[0] ?? 'en';
|
||||
const fallbackLang = cropped.match(/en|de|it|zh/) ? cropped : 'en';
|
||||
const fallbackLang = cropped.match(/en|de|fr|it|pl|zh/) ? cropped : 'en';
|
||||
|
||||
const lang = userprofile?.human?.profile?.preferredLanguage.match(/en|de|it|zh/)
|
||||
const lang = userprofile?.human?.profile?.preferredLanguage.match(/en|de|fr|it|pl|zh/)
|
||||
? userprofile.human.profile?.preferredLanguage
|
||||
: fallbackLang;
|
||||
this.translate.use(lang);
|
||||
|
||||
Reference in New Issue
Block a user