To implement internationalization using nuxt's own i18n library. Starting here and then moving to GCV.
What I changed
Installed @nuxtjs/i18n and configured it as a module in Nuxt config. We are detecting the browser language and setting the strategy to no_prefix.
Added English, Spanish, Dutch, and Portuguese translations.
Implemented translations wherever any strings are found in the app.
Added a language switcher dropdown on MapDashboard component.
I was initially working with a prefix strategy and was trying to get i18n to play nice with auth0, which is a bit tricky (c.f. for example this stackoverflow page). I ended up not going the route of having a prefix strategy for now, which resolves any discrepancies; but in the process, I did end up streamlining some of the authentication code.
What I'm not doing here
As mentioned above, setting a prefix strategy. We can revisit that if we see the need for one of the Nuxt apps.
Goal
To implement internationalization using nuxt's own i18n library. Starting here and then moving to GCV.
What I changed
@nuxtjs/i18n
and configured it as a module in Nuxt config. We are detecting the browser language and setting the strategy tono_prefix
.What I'm not doing here