We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
defaultLocale
1 parent 51f7967 commit 28e60acCopy full SHA for 28e60ac
1 file changed
src/prepare/options.ts
@@ -23,7 +23,8 @@ export function prepareOptions({ options }: I18nNuxtContext, nuxt: Nuxt) {
23
}
24
25
const strategy = nuxt.options.i18n?.strategy || options.strategy
26
- if (strategy.endsWith('_default') && !nuxt.options.i18n?.defaultLocale) {
+ const defaultLocale = nuxt.options.i18n?.defaultLocale || options.defaultLocale
27
+ if (strategy.endsWith('_default') && !defaultLocale) {
28
logger.warn(
29
`The \`${strategy}\` i18n strategy${nuxt.options.i18n?.strategy == null ? ' (used by default)' : ''} needs \`defaultLocale\` to be set.`
30
)
0 commit comments