mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-30 19:12:16 +00:00
feat: Zitadel translated into Spanish (#5634)
* feat: spanish translation in progress * feat: 85% of translated strings * feat: spanish translation 95% done * fix: fix some typos * fix: add missing translations for recent commits * Apply suggestions from code review Co-authored-by: Livio Spring <[email protected]> --------- Co-authored-by: Elio Bischof <[email protected]> Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
Elio Bischof
parent
8745c87ded
commit
d140f9373a
@@ -267,15 +267,15 @@ export class AppComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
private setLanguage(): void {
|
||||
this.translate.addLangs(['de', 'en', 'fr', 'it', 'ja', 'pl', 'zh']);
|
||||
this.translate.addLangs(['de', 'en', 'es', 'fr', 'it', 'ja', 'pl', 'zh']);
|
||||
this.translate.setDefaultLang('en');
|
||||
|
||||
this.authService.user.subscribe((userprofile) => {
|
||||
if (userprofile) {
|
||||
const cropped = navigator.language.split('-')[0] ?? 'en';
|
||||
const fallbackLang = cropped.match(/de|en|fr|it|ja|pl|zh/) ? cropped : 'en';
|
||||
const fallbackLang = cropped.match(/de|en|es|fr|it|ja|pl|zh/) ? cropped : 'en';
|
||||
|
||||
const lang = userprofile?.human?.profile?.preferredLanguage.match(/de|en|fr|it|ja|pl|zh/)
|
||||
const lang = userprofile?.human?.profile?.preferredLanguage.match(/de|en|es|fr|it|ja|pl|zh/)
|
||||
? userprofile.human.profile?.preferredLanguage
|
||||
: fallbackLang;
|
||||
this.translate.use(lang);
|
||||
|
||||
Reference in New Issue
Block a user