从控制台收到消息“重复名称路由”

时间:2018-07-17 04:13:34

标签: nuxt.js vue-i18n

我与nuxt.js和nuxt-i18n一起使用语言环境。

但是我总是在控制台上重复得到此消息,即使我使用nuxt也会从文件夹结构中生成该消息。

消息:

enter image description here

路由:

enter image description here

配置示例:

modules: [
    '@nuxtjs/axios',
    ['nuxt-i18n', {
      locales: [
        { name: 'ภาษาไทย', code: 'th', iso: 'th-TH', file: 'th.js' },
        { name: 'English', code: 'th', iso: 'en-US', file: 'en.js' }
      ],
      defaultLocale: 'th',
      lazy: true,
      langDir: 'lang/'
    }]
  ],

请帮助。谢谢。

1 个答案:

答案 0 :(得分:1)

两个地区的代码都相同。

  

代码:“ th”

将英语代码更改为en,它应该可以解决问题