Open rbozan opened 2 weeks ago
Translated Parameters like the ones you described are on our roadmap and will be added soon.
In the meantime you could disable alternate-link generation & add them manually so you get the result you want.
// src/lib/i18n.js
export const i18n = createI18n({
seo: { noAlternateLinks: true }
})
For reference, this is the code paraglide-sveltekit currently uses to generate alternate links.
But can that be done on a per page basis?
Currently no, but you can do it from a layout
For example let's say that we have a route called /lesson/[:name] where [:name] is an ordinal number in the selected language, it means these exist:
/en/lesson/first , /en/lesson/second, /en/lesson/third /nl/lesson/eerste, /nl/lesson/tweede, /nl/lesson/derde
The problem is that when you are on the path /en/lesson/first it will incorrectly generate /nl/lesson/first as alternative links in the head tag. Could we somehow customize this so we can give the correct alternative links?