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:
Miguel Cabrerizo
2023-04-14 15:53:19 +02:00
committed by GitHub
co-authored by Livio Spring Elio Bischof
parent 8745c87ded
commit d140f9373a
30 changed files with 3894 additions and 35 deletions
+3 -3
View File
@@ -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);