Im using nuxtjs 2.10.x and i18n module. Nu custom middleware or anything like that. The routing is working fine.
my nuxt.config.js
modules/i18n part:
...
modules: [
'@nuxtjs/axios',
'@nuxtjs/pwa',
'@nuxtjs/auth',
'@nuxtjs/dotenv',
'nuxt-fontawesome',
[
'nuxt-i18n',
{
locales: [
{
code: 'en',
iso: 'en-US',
file: 'en.json',
name: 'English'
},
{
code: 'zh',
iso: 'zh-CN',
file: 'zh.json',
name: '简体中文'
}
],
lazy: true,
langDir: 'locales/',
defaultLocale: 'en',
strategy: 'prefix_except_default',
differentDomains: false,
vueI18n: {
fallbackLocale: 'en'
},
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'lang'
}
}
]
],
...
pages folder structure:
'pages/'
|--'contact_us.vue'
|--'_lang/'
|--'contact_us.vue'
But I'm getting this crazy warning: [vue-router] Route with name 'contact_us___en' does not exist
. Actually nuxt is giving similar warning for the all pages I have. And there is no any clue why it's like that. What is possibly wrong?