Exhaust preferences before defaulting
05A reader can list several language preferences. Lookup exhausts the first range’s shorter attempts, then tries the next range. A default comes after the whole requested list.
Now request only *. In this example’s lookup policy it reaches the configured ja-JP default. Under filtering, * instead returns both available labels.
Key idea: Every requested range MUST be tried before seeking or calculating the default.
Terms
- Priority list
- Language ranges listed in the reader’s preference order. The using protocol defines its syntax.
- Default
- The using application’s specified outcome after lookup requests fail.
Rules & examples
Every requested range MUST be tried before seeking or calculating the default.
- The using application MUST define default behavior. It might return a configured item, an empty value or an error. No language, including English, is the RFC’s universal default.
- For fr-FR then zh-Hant, try fr-FR and fr before zh-Hant and zh. A configured default range is treated as appended after the entire list, not after each preference.
- In lookup, * is skipped when another range follows. If * is alone or final, compute the default. It does not choose a universally best language.
- The same * under filtering matches every available label. The using protocol MUST specify the matching scheme and, for lookup, the default behavior (§3.2).
- The configured example default is ja-JP. The application still needs a final outcome if that default search fails. This guide does not define HTTP q-value parsing or translation.
The input changes between the two-preference, one-preference and wildcard examples are labeled explicitly. ja-JP is chosen for this application, not an RFC-wide recommendation.
Sources
New to this? Start hereA quick picture + helpful background
Requested languages and available labels
Imagine a catalog of labeled documents. A filter keeps all labels that fit a pattern; a lookup tries preferences and returns one exact label or a defined default. Neither operation translates the document or guarantees understanding.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.