Interface LocaleMatcher

All Known Subinterfaces:
Strings

public interface LocaleMatcher
Contract for matching an input Locale or List<Locale.LanguageRange> to an appropriate localized strings Locale.

Lokalized's implementation prefers exact and CLDR-canonical matches, then CLDR parent-locale fallback, then script-aware likely-subtag matches. If multiple supported localized strings files still share the same language, configured tiebreakers determine which locale wins. Unmatched, root, and undetermined requests resolve to the configured fallback locale when using bestMatchFor(...). The strict matchFor(...) methods represent the same state as an unmatched LocaleMatchResult instead of manufacturing a match.

Non-bare wildcard language ranges use RFC 4647 extended filtering only; they are not broadened through CLDR, likely-subtag, or primary-language heuristics, and successful results report LocaleMatchType.EXTENDED_RANGE. When multiple ranges match one supported locale, the most-specific exact, canonical, or structural range determines its effective quality, including a q=0 exclusion.

Author:
Mark Allen