Add a language switcher with English, Italian, Spanish and French

The interface is translated through @nuxtjs/i18n: strings live in
i18n/locales/*.json, routes are prefixed except for the default English, and
useLocaleHead emits the lang attribute, the hreflang alternates and og:locale.

The switcher is a native select rather than a custom dropdown: keyboard
support, the platform picker on mobile and correct labelling come for free.

Article content stays single-language — this translates the site chrome only.
This commit is contained in:
2026-08-25 14:23:09 +02:00
parent f5639111f9
commit c08f53ca69
21 changed files with 3197 additions and 87 deletions
+2
View File
@@ -52,6 +52,8 @@ services:
NUXT_STRAPI_URL: ${STRAPI_URL}
NUXT_PUBLIC_SITE_URL: ${PUBLIC_SITE_URL}
NUXT_PUBLIC_STRAPI_URL: ${PUBLIC_STRAPI_URL}
# Absolute origin for the alternate-language links.
NUXT_PUBLIC_I18N_BASE_URL: ${PUBLIC_SITE_URL}
caddy:
image: caddy:2-alpine