Closed VaclavObornik closed 8 years ago
I'd like to see something like this. Turns out when Accept-Language is undefined, the Locale.default is returned, which isn't necessarily part of our supported lang list.
So passing in the default, or taking the first item in the array as default would be good.
new locale.Locales(['en_GB', 'en_CA', 'fr_CA']).default === 'en_GB'
This is useful fix
Really useful!
@jed Can you merge this in and maybe publish a new release?
Hey @VaclavObornik can you rebase on the latest master revision please? I'll handle the merge and publish but there are conflicts that need to be handled first.
@florrain @jed It's been 2 years since this PR was opened. Unsure if @VaclavObornik is still paying attention or wants to deal with this.
This is an issue that I'd like fixed ASAP, so I went ahead and made a branch on my fork rebased to master and updated his commits to fix merge conflicts. Since technically by rebasing, I amended his commits, and I feel weird about that (the commits are still authored by him, but I amended them), I also created a merged (not rebased) branch which I'll open the PR from. If you'd rather I PR the rebased one, let me know. Or if you'd rather I rebase and squash let me know.
Thanks @rhagigi I replied on the other PR, let's coordinate next steps from there.
When more then one instance of supported languages is needed, each instance should be able to have different default value.