Complete the code to enable locale sub-path routing in Next.js configuration.
module.exports = {
i18n: {
locales: ['en', 'fr'],
defaultLocale: 'en',
localeDetection: true,
[1]: true
}
}The correct property to enable sub-path routing for locales in Next.js is localeSubpathRouting.
Complete the Next.js config to set the default locale to French.
module.exports = {
i18n: {
locales: ['en', 'fr'],
[1]: 'fr',
localeSubpathRouting: true
}
}The property to set the default locale in Next.js is defaultLocale.
Fix the error in the Next.js config to correctly enable locale sub-path routing.
module.exports = {
i18n: {
locales: ['en', 'fr'],
defaultLocale: 'en',
localeSubpathRouting: [1]
}
}The localeSubpathRouting property expects a boolean true to enable it, not a string or number.
Fill both blanks to create a Next.js config that supports English and Spanish locales with sub-path routing enabled.
module.exports = {
i18n: {
locales: [[1]],
defaultLocale: [2],
localeSubpathRouting: true
}
}The locales array should include 'en' and 'es'. The defaultLocale should be 'en'.
Fill all three blanks to create a Next.js config with locales English, French, and German, defaulting to French, and enabling sub-path routing.
module.exports = {
i18n: {
locales: [[1]],
defaultLocale: [2],
localeSubpathRouting: [3]
}
}The locales array includes 'en', 'fr', and 'de'. The defaultLocale is 'fr'. Sub-path routing is enabled with boolean true.