pub fn detect_locale(url: String, locales: &Locales)
Expand description

Detects which locale the user should be served and redirects appropriately. This should only be used when the user navigates to a page like /about, without a locale. This will only work on the client-side (needs access to browser i18n settings). Any pages that direct to this should be explicitly excluded from search engines (they don’t show anything until redirected). This is guided by RFC 4647, but is not yet fully compliant (only supports xx-XX form locales). Note that this bypasses Sycamore’s routing logic and triggers a full reload.