diff --git a/.changeset/gentle-eyes-double.md b/.changeset/gentle-eyes-double.md new file mode 100644 index 000000000..5e4cdac20 --- /dev/null +++ b/.changeset/gentle-eyes-double.md @@ -0,0 +1,8 @@ +--- +"@bigcommerce/catalyst-core": patch +--- + +Change LocalePrefix mode to `as-needed`, since there's an issue that is causing caching problems when using `never`. + +More info about LocalePrefixes: https://next-intl-docs.vercel.app/docs/routing#shared-configuration +Open issue: https://github.com/amannn/next-intl/issues/786 diff --git a/core/i18n/routing.ts b/core/i18n/routing.ts index d9594d61a..c38de3e3e 100644 --- a/core/i18n/routing.ts +++ b/core/i18n/routing.ts @@ -64,13 +64,13 @@ export const localeLanguageRegionMap: LocaleEntry[] = [ enum LocalePrefixes { ALWAYS = 'always', - NEVER = 'never', + // Don't use NEVER as there is a issue that causes cache problems and returns the wrong messages. + // More info: https://github.com/amannn/next-intl/issues/786 + // NEVER = 'never', ASNEEDED = 'as-needed', // removes prefix on default locale } -// Temporary we use NEVER prefix to prioritize accept-language header -// & disable internationalized routes due to incomplete multilingual implementation -export const localePrefix: LocalePrefix = LocalePrefixes.NEVER; +export const localePrefix: LocalePrefix = LocalePrefixes.ASNEEDED; export const defaultLocale = 'en';