从控制台 "Duplicate names route" 收到消息
Got message from console "Duplicate names route"
我使用 nuxt.js 和 nuxt-i18n
来使用语言环境。
但我总是在控制台上重复收到此消息,即使我使用 nuxt 从文件夹结构生成。
留言:
路由:
配置示例:
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/'
}]
],
请帮忙。谢谢。
您的两个语言环境代码相同。
code: 'th'
将英文代码更改为 en 应该可以解决问题
我使用 nuxt.js 和 nuxt-i18n
来使用语言环境。
但我总是在控制台上重复收到此消息,即使我使用 nuxt 从文件夹结构生成。
留言:
路由:
配置示例:
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/'
}]
],
请帮忙。谢谢。
您的两个语言环境代码相同。
code: 'th'
将英文代码更改为 en 应该可以解决问题