Skip to content

Conversation

@benjamincanac
Copy link
Member

@benjamincanac benjamincanac commented Nov 26, 2025

πŸ”— Linked issue

Resolves #5536, resolves #5359

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@github-actions github-actions bot added the v4 #4488 label Nov 26, 2025
@benjamincanac
Copy link
Member Author

@BobbieGoede I'd love your feedback on this, would this work?

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 26, 2025

npm i https://pkg.pr.new/@nuxt/ui@5537

commit: ba407ae

Comment on lines +145 to +148
const localePath = nuxtApp.$localePath as ((route: RouteLocationRaw) => RouteLocationRaw) | undefined
if (localePath) {
return localePath(path)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const localePath = nuxtApp.$localePath as ((route: RouteLocationRaw) => RouteLocationRaw) | undefined
if (localePath) {
return localePath(path)
}
const localeRoute = nuxtApp.$localeRoute as ((route: RouteLocationRaw) => RouteLocationRaw) | undefined
if (localeRoute) {
return localeRoute(path)
}

localePath will resolve to a path string, using localeRoute should preserve route properties (things like state)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ULink or UButton link with locale How to have localized links in ContentSearch?

3 participants