mapbox / locale-utils

0 stars 2 forks source link

Refine locale parsing #2

Closed 1ec5 closed 6 years ago

1ec5 commented 6 years ago

This change prevents parseLocaleIntoCodes() from matching in the middle of the locale identifier and adds support for three-letter ISO 639-3 language codes. For example, spa-ES (Spanish in Spain) was being parsed as the bogus language code sp, ignoring the country code.

/cc @bsudekum