// classic string from a browser with both en-us and en-gb
var locs = new Locale.Locales('it-it, it;q=0.9, en-us;q=0.8, en-gb;q=0.7, en;q=0.6')
var best = locs.best(new Locale.Locales('en-gb,en,fr,de', 'en'));
best.normalized
This print: en
I would have expected en_GB since it is in the list of supported languages and it has an higher score then en (0.7 vs 0.6).
Using locale version 0.1.0.
Take this example:
This print:
en
I would have expected
en_GB
since it is in the list of supported languages and it has an higher score thenen
(0.7 vs 0.6).locs:
if I replace
en-gb
withen-us
in the supported list I geten-us
as expected