rinart73/sveltekit-localize-url

Allow to specify fallback locales in the `href` and `wrapHref` functions

Closed this issue · 0 comments

Current behaviour:

href(localizedPage, 'ru', '/[l_about]', true); // try to create 'ru' version, fallback to 'en'

Suggested:

href(localizedPage, 'ru', '/[l_about]', 'it'); // try to create 'ru' version, fallback to 'it'
href(localizedPage, 'en', '/[l_about]', ['ru', 'it']); // try to create 'en' version, fallback to 'ru' and then 'it'