Replies: 1 comment
-
|
The double base means both helpers are owning the base path. SvelteKit's Pick one owner: <!-- SvelteKit owns the base path -->
<a href={resolve(localizeHref('/about', { locale }))}>About</a>In that setup, keep Paraglide's localized paths app-relative and do not include the SvelteKit base in Paraglide patterns. Or: <!-- Paraglide patterns own the base path -->
<a href={localizeHref('/about', { locale })}>About</a>In that setup, do not wrap the result in The Paraglide SvelteKit docs show |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the correct way to use paraglide for i18n in a sveltekit app that has a base path set? I've found paraglide's documentation on base paths, which works, with one significant drawback. I can no longer use
resolve()from$app/pathsin combination withlocalizeHreffrom$lib/paraglide/runtime. The base path gets inserted twice. We could abandon use ofresolve, but like the type safety it provides.Is there official guidance of what to do in this scenario?
Beta Was this translation helpful? Give feedback.
All reactions