Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Regional Variants Aren't Being Used #2

Open
mattt opened this issue Jul 23, 2019 · 0 comments
Open

Regional Variants Aren't Being Used #2

mattt opened this issue Jul 23, 2019 · 0 comments
Labels
good first issue Good for newcomers

Comments

@mattt
Copy link
Collaborator

mattt commented Jul 23, 2019

Currently, DayPeriodFormatter only uses a locale's language code to determine the day period string. However, some rule sets have regional variations, such as es_cO, for "Spanish (Colombia)". These should be selected for matching locales.

This should be as straightforward as changing the current implementation to make two checks, first with and then without the region code. The only real trick is matching the identifier format for case and punctuation (e.g. Locale.identifier BCP 47 es-CO -> CLDR key es_co)

let ruleSet = DayPeriodFormatter.ruleSetsByLanguageCode[languageCode],

@mattt mattt added the good first issue Good for newcomers label Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Development

No branches or pull requests

1 participant