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:
@@ -18,3 +18,4 @@ services:
|
||||
environment:
|
||||
NUXT_PUBLIC_SITE_URL: http://localhost:3000
|
||||
NUXT_PUBLIC_STRAPI_URL: http://localhost:1337
|
||||
NUXT_PUBLIC_I18N_BASE_URL: http://localhost:3000
|
||||
|
||||
Reference in New Issue
Block a user