Complete the code to define the default locale in Next.js domain routing.
module.exports = {
i18n: {
locales: ['en', 'fr'],
defaultLocale: '[1]',
domains: []
}
}The defaultLocale sets the main language for your app. Here, 'en' is the default.
Complete the code to add a domain for the French locale in Next.js domain routing.
module.exports = {
i18n: {
locales: ['en', 'fr'],
defaultLocale: 'en',
domains: [
{
domain: '[1]',
defaultLocale: 'fr'
}
]
}
}The domain example.fr is used for the French locale in domain routing.
Fix the error in the domain routing config by completing the missing property.
module.exports = {
i18n: {
locales: ['en', 'fr'],
defaultLocale: 'en',
domains: [
{
domain: 'example.com',
[1]: 'en'
}
]
}
}The correct property to specify the locale for a domain is defaultLocale.
Fill both blanks to configure domain routing for English and French locales.
module.exports = {
i18n: {
locales: ['en', 'fr'],
defaultLocale: '[1]',
domains: [
{
domain: '[2]',
defaultLocale: 'fr'
}
]
}
}The default locale is 'en' and the French domain is 'example.fr'.
Fill all three blanks to complete the Next.js domain routing config with English and French locales and domains.
module.exports = {
i18n: {
locales: ['en', 'fr'],
defaultLocale: '[1]',
domains: [
{
domain: '[2]',
defaultLocale: '[3]'
}
]
}
}The default locale is 'en' (served on the main domain like example.com), and the French domain is 'example.fr' with defaultLocale 'fr'.