Builds a locale negotiator for a fixed set of supported locales.
Ranks the header's ranges by quality value and returns the first supported locale, trying
each range whole (pt-br) before its language subtag (pt); q=0 refuses a locale.
Needed because a raw header like fr-CA,fr;q=0.9,en;q=0.8 matches no catalog key and
would make resolveMessage fall back to the default locale.
Builds a locale negotiator for a fixed set of supported locales.
Ranks the header's ranges by quality value and returns the first supported locale, trying each range whole (
pt-br) before its language subtag (pt);q=0refuses a locale. Needed because a raw header likefr-CA,fr;q=0.9,en;q=0.8matches no catalog key and would make resolveMessage fall back to the default locale.