From 93ab0c0d79ac3de8f551d919798027f27bb819a8 Mon Sep 17 00:00:00 2001 From: Noel Sabia Date: Fri, 23 Oct 2026 22:00:34 +0200 Subject: [PATCH] feat(i18n): add five locales and a header language switcher Locale files in i18n/locales for en, de, es, it and pl; English stays at / and the others are prefixed. One flag dropdown after the GitHub link on desktop, logo plus the language button on phones. Nav, quick links and footer strings go through $t, and the footer line drops "self-healing on purpose". --- app/components/AppFlag.vue | 33 + app/components/AppFooter.vue | 2 +- app/components/AppHeader.vue | 6 +- app/components/AppLanguageSwitcher.vue | 75 ++ app/components/AppNav.vue | 8 +- app/components/AppQuickLinks.vue | 4 +- i18n/locales/de.json | 17 + i18n/locales/en.json | 17 + i18n/locales/es.json | 17 + i18n/locales/it.json | 17 + i18n/locales/pl.json | 17 + nuxt.config.ts | 12 +- package.json | 1 + pnpm-lock.yaml | 1263 ++++++++++++++++++++++-- 14 files changed, 1423 insertions(+), 66 deletions(-) create mode 100644 app/components/AppFlag.vue create mode 100644 app/components/AppLanguageSwitcher.vue create mode 100644 i18n/locales/de.json create mode 100644 i18n/locales/en.json create mode 100644 i18n/locales/es.json create mode 100644 i18n/locales/it.json create mode 100644 i18n/locales/pl.json diff --git a/app/components/AppFlag.vue b/app/components/AppFlag.vue new file mode 100644 index 0000000..4dce403 --- /dev/null +++ b/app/components/AppFlag.vue @@ -0,0 +1,33 @@ + + + diff --git a/app/components/AppFooter.vue b/app/components/AppFooter.vue index 227bd80..c9b06af 100644 --- a/app/components/AppFooter.vue +++ b/app/components/AppFooter.vue @@ -3,7 +3,7 @@
- Served from my own server · k8s · Terraform · self-healing on purpose + {{ $t('footer.servedFrom') }}
diff --git a/app/components/AppLanguageSwitcher.vue b/app/components/AppLanguageSwitcher.vue new file mode 100644 index 0000000..1de35ac --- /dev/null +++ b/app/components/AppLanguageSwitcher.vue @@ -0,0 +1,75 @@ + + + diff --git a/app/components/AppNav.vue b/app/components/AppNav.vue index b477cc6..a5f8916 100644 --- a/app/components/AppNav.vue +++ b/app/components/AppNav.vue @@ -1,23 +1,23 @@ diff --git a/app/components/AppQuickLinks.vue b/app/components/AppQuickLinks.vue index 166b822..6124b37 100644 --- a/app/components/AppQuickLinks.vue +++ b/app/components/AppQuickLinks.vue @@ -1,8 +1,8 @@