Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: Better align BestAvailableLocale with BCP 47
Per RFC 4647 section 3.4 - Lookup (https://www.rfc-editor.org/rfc/rfc4647.html#section-3.4 ), > Single letter or digit subtags (including both the letter 'x', which > introduces private-use sequences, and the subtags that introduce > extensions) are removed at the same time as their closest trailing > subtag. This is relevant for a requested locale such as "en-x-y-z-foo", which should be truncated first to "en-x-y-z" and then to "en" ("y" is removed at the same time as its closest trailing subtag "z" and "x" is removed at the same time as its closest trailing subtag "y", which means all three are removed in one step). However, the change is still editorial because BestAvailableLocale is never called with _availableLocales_ that would contain a language tag like "en-x-y".
- Loading branch information