I have multilingual Nuxt 2 app which working on URI /catalog as separated part. Here is related parts in my nuxt.config.js:
// Router configuration
router: {
base: '/catalog',
},
// Localization
i18n: {
locales: [
{ code: 'en', file: 'en.js' },
{ code: 'de', file: 'de.js' },
],
defaultLocale: 'en',
lazy: true,
langDir: '@/locales/',
detectBrowserLanguage: false
},
As result I have URL's:
sitename.com/catalog --> default EN
sitename.com/catalog/de --> DE code is wrong place for me
How to make next structure of URL and keep current router.base settings:
sitename.com/de/catalog