fluent.js icon indicating copy to clipboard operation
fluent.js copied to clipboard

use Intl.Locale for langneg

Open ImUrX opened this issue 2 years ago • 3 comments

Requires fixing some test errors

ImUrX avatar Dec 30 '22 10:12 ImUrX

Yes as you can see I handle the private-usage part by just reading the last subtag (because its always the last one), what should I do?

ImUrX avatar Jan 03 '23 00:01 ImUrX

I also personally ended up using a ponyfill of the Intl.LocaleMatcher standard proposal in my code.

ImUrX avatar Jan 03 '23 00:01 ImUrX

Yes as you can see I handle the private-usage part by just reading the last subtag (because its always the last one), what should I do?

I see that. Hmmm. Could you make use of the normalization done in the baseName? As in, split it by - and compare the parts for each locale? That might allow for the implementation change to be considered a relaxation of the variant regexp.

eemeli avatar Jan 03 '23 07:01 eemeli