I made a upgrade to nuxt/i18n v10.2.3 but my translations are no longer working (came from v9) and I get the message "[GET] "/_i18n/iOAj27cA/nl-BE/messages.json": 404 Server Error". I'm probably a rare occasion for using nl-be as a locale but I can't seem to track the exact reason for failure.
This is my Nuxt setup:
baseUrl: baseUrl,
defaultLocale: defaultLocale,
experimental: {
localeDetector: "localeDetector.ts",
},
locales: [
{
code: "nl-be",
language: "nl",
name: "Nederlands",
file: "nl-be.json",
},
{
code: "fr-be",
language: "fr",
name: "Français",
file: "fr-be.json",
},
],
strategy: "prefix",
And this is my Vue setup:
legacy: false,
locale: "nl-be",
fallbackLocale: "nl-be",
fallbackWarn: false,
missingWarn: false,
messages: {
"nl-be": nl,
"fr-be": fr,
},
I don't know if the main reason is the case sensitivity (nl-be vs nl-BE) or not... When I use nl-BE everywhere, it changes the prefix in the URL to /nl-BE (whilst we prefer all lowercase) and when executing the following ("const i18nLocale = await event.context.i18n?.locale();") I get the error message "Cannot read properties of undefined (reading 'messages')".
It's all kinda confusing.