#How are you resolving routes while using I18n module?

5 messages · Page 1 of 1 (latest)

blissful kiln
#

Previously, I obtained route paths by passing an object with route name and parameters to NuxtLink, which worked perfectly. However, once I introduced the I18n module, all my route names have been prefixed with locale names (login___en, login___es, etc.). This now makes it problematic to obtain routes as now I need to pass the current locale alongside with the route name. This makes the code unreadable and adds extra hassle to the development. Do you have any better solution for obtaining route paths?

static tangle
blissful kiln
#

Well, I think i18n should be dealing with head automatically. So it sets the lang to the current locale

#

This is the config:
i18n: {
locales: ["en", "ru"],
defaultLocale: "en",
vueI18n: "lang/config.js"
},

static tangle
#

try this?