Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ecosystem/theme-default/src/client/components/NavbarItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const useNavbarSelectLanguage = (): ComputedRef<ResolvedNavbarItem[]> => {
}
const currentPath = router.currentRoute.value.path
const currentFullPath = router.currentRoute.value.fullPath
const currentHash = router.currentRoute.value.hash

const languageDropdown: ResolvedNavbarItem = {
text: themeLocale.value.selectLanguageText ?? 'unknown language',
Expand Down Expand Up @@ -65,8 +64,8 @@ const useNavbarSelectLanguage = (): ComputedRef<ResolvedNavbarItem[]> => {
if (
router.getRoutes().some((item) => item.path === targetLocalePage)
) {
// try to keep current hash across languages
link = `${targetLocalePage}${currentHash}`
// try to keep current hash and params across languages
link = currentFullPath.replace(currentPath, targetLocalePage)
} else {
link = targetThemeLocale.home ?? targetLocalePath
}
Expand Down