s00d / nuxt-i18n-micro

Nuxt I18n Micro is a fast, simple, and lightweight internationalization (i18n) module for Nuxt
https://s00d.github.io/nuxt-i18n-micro/
MIT License
87 stars 11 forks source link

switchLocale improvements #25

Closed tirojal closed 1 month ago

tirojal commented 1 month ago
  1. adds $setI18nRouteParams for setting slugs locale based
  2. exposes related helpers:
    • $switchLocaleRoute
    • $switchLocalePath
    • $localePath (just be in align with $switch-version)
  3. fixes $localeRoute issue with missing query and hash
s00d commented 1 month ago

I’ve merged and published the update. In the future, please use npm run lint and npm run lint:fix if there are any issues (it doesn’t fix everything, just the simple ones; the rest need to be corrected manually). Also, it’s highly recommended to write tests right away to avoid errors when updating. I’ve written tests for your changes.”