pub fn negotiate_locale(
preferred: &[String],
available: &[String],
default_locale: &str,
) -> StringExpand description
Given a list of preferred locales (from Accept-Language) and a list of available locales (directories on disk), returns the best match.
Matching rules:
- Exact match (e.g., “fr-CH” matches “fr-CH”)
- Prefix match (e.g., “fr-CH” matches “fr”)
- Default locale fallback