Skip to content

Commit

Permalink
change: switchLocale change to router
Browse files Browse the repository at this point in the history
  • Loading branch information
s00d committed Aug 18, 2024
1 parent 5714fd9 commit 39487ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-i18n-micro",
"version": "1.1.8",
"version": "1.1.7",
"description": "Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.",
"repository": "s00d/nuxt-i18n-micro",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/01.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function switchLocale(locale: string, route: RouteLocationNormalizedLoaded, rout
if (locale !== defaultLocale || i18nConfig.includeDefaultLocaleRoute) {
newParams.locale = locale
}
window.location.href = router.resolve({ name: newRouteName, params: newParams }).fullPath
router.push({ name: newRouteName, params: newParams })
}

/**
Expand Down

0 comments on commit 39487ad

Please sign in to comment.