super-sitemap icon indicating copy to clipboard operation
super-sitemap copied to clipboard

Update i18n implementation to support param matches (e.g. `[[lang=lang]]`)

Open jasongitmail opened this issue 1 year ago • 2 comments
trafficstars

Currently, only exactly [[lang]] is supported.

See: https://github.com/jasongitmail/super-sitemap/issues/3#issuecomment-1864833044

jasongitmail avatar Dec 20 '23 17:12 jasongitmail

I think this is not needed anymore. Haven't migrated yet so idk if it'll work out of the box with super-sitemap, but take a look at https://inlang.com/m/dxnzrydw/library-inlang-paraglideJsAdapterSvelteKit

TL;DR: now a [[lang=lang]] route is not required (thanks to the paraglide preprocessor and https://kit.svelte.dev/docs/hooks#universal-hooks-reroute)

buhodev avatar Jan 24 '24 02:01 buhodev

It won't work out of the box unfortunately bc super sitemap depends on reading the routes from disk and parsing them.

Paraglide adds a couple curve balls: 1) lack of lang route param to identify these and 2) localizable routes where the route text itself changes, and not just the lang slug. It might require changing literally everything, idk.

If someone wants to look into paraglide and open an issue proposing how we can adapt the current SuperSitemap to support it technically, that'd be helpful.

Otherwise, I'll have to look into it to gauge feasibility a few weeks down the road.

jasongitmail avatar Jan 25 '24 04:01 jasongitmail

Param matchers and required lang params are both now supported in v0.14.17 on NPM.

jasongitmail avatar Jul 03 '24 02:07 jasongitmail