Skip to content

Locale as a route and redirection #2481

Discussion options

You must be logged in to vote

With @inlang/paraglide-js-adapter-sveltekit you shouldn't need a language parameter at all. You can just place your routes at the root of your routes folder & the routing should just work.

You can tell it to always include the language in the url by passing the prefixDefaultLanguage: "always" option to createI18n like so:

// src/lib/i18n.js
import ... from ...

export const i18n = createI18n(runtime, { prefixDefaultLanguage: "always" })

Replies: 0 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@psntr
Comment options

@LorisSigrist
Comment options

@psntr
Comment options

@LorisSigrist
Comment options

Answer selected by psntr
Comment options

You must be logged in to vote
1 reply
@LorisSigrist
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants