Reputation: 13162
I had set default it
in nuxt.config.js
like this :
But if I access localhost it redirect to : http://localhost:3000/en
Should it redirect to http://localhost:3000/
How can I solve this problem?
Upvotes: 1
Views: 3832
Reputation: 321
You should use detectBrowserLanguage Like this :
For example default locale set to FR
[
'nuxt-i18n',
{
locales: ['fr', 'en'],
defaultLocale: 'fr',
detectBrowserLanguage: false,
vueI18n: {
fallbackLocale: 'en',
messages: {
fr: {
index:'home'
},
en: {
index:'Index'
}
}
}
}
],
Upvotes: 5