opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
22 stars 0 forks source link

SvelteKit Adapter - Automatic Language Detection and Redirects except for Default language #137

Open mmailaender opened 1 month ago

mmailaender commented 1 month ago

Proposal on top of https://github.com/opral/inlang-paraglide-js/issues/55: Do only the redirect if the language isn't the Apps default.

If en is default and the client's browser has also en -> No prefix/Redirect If en is default and the client's browser has de -> Redirect to /de

LorisSigrist commented 1 month ago

We can implement something like that, but I don't think this is a good default.

With this behavior the same URL can now render different languages which will confuse search engines. Additionally, users usually don't care which language the "default language" is, they just want to see their language, so having separate behavior for different languages may be confusing.

The original motivation for putting the default language on / by default instead of /[lang] was to make static-sites easier to deploy. It was a concession to practicality, not an optimal design.