Sveltekit: translate route parameters like [countryName] #2482
Unanswered
mquandalle
asked this question in
[Paraglide] Svelte + SvelteKit
Replies: 0 comments 4 replies
-
Translating parameters isn't something we can do yet. What you could try is to generate the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's say that I have a route
/travel-[countryName]
I want to translate the URL
/travel-spain
into/fr/voyage-espagne
. Currently there is no clear way to translate the route parameter[countryName]
,Currently I'm doing the following:
[countryName]
translations for the current country, for exampleresolveRoute
before handing it toi18n.route
:This works for the
<LangSelector />
component but not for<link rel="alternate" />
links in the HTML<head>
, and it doesn't feel well integrated into the library.Beta Was this translation helpful? Give feedback.
All reactions