ivanhofer/typesafe-i18n-demo-sveltekit

How do you handle the default route not having a route?

Closed this issue · 3 comments

Hi, if you were to make one default language not have a route, how would you do it?

Like This:

it - website.com/
de - ewbsite.com/de/
fr - website.com/fr/

Thanks !

You can use rest parameters to archieve this:

/routes/[...lang]/+page.svelte

Renkas commented

Sorry to dig up this old issue but I think its better than starting a new one.

Could you please add some kind of sample on how it would work?

I'm sorry but I don't have the time to offer a detailed explanation to every possible issue. Rest parameters are a SvelteKit feature and you should look at the documention or ask in Svelte's discord server if something is unclear.