setDynamicParams
When having dynamic params in your routes (like src/routes/blog/[slug]
), you need to manually specify the
equivalent params in other locales. That will then be passed to switchLocalePath
and getSwitcherData
.
This is particularly useful if you have different corresponding slugs per locale. For example if you want:
Directoryblog/
- hello-world
Directoryfr/
Directoryle-blog/
- bonjour-le-monde
Data shapes
It accepts a single parameter with 2 shapes: object or array.
Object
Array
More convenient when working with data programmatically