Closed fwwarr closed 7 years ago
Hi @basz any chance this might be considered for a merge soon? It's a relatively simple but useful feature and I've provided unit tests and documentation updates. Thanks!
@fwwarr I am not sure about use case for this. Why can't you have en
as supported locale and all en-*
will fallback to this.
Hi @svycka, I see two use cases for this:
en-*
map to en-CA
(not just to en
) in order for currencies, number and date formats, etc. to display according to en-CA
for all clients that accept en-XX
.en-US
and en-GB
and have en
or en-*
map to en-US
but en-CA
map to en-GB
.@fwwarr can you rebase and change arrays to sort array syntax?
This would really help me a lot, hope we can move forward to close this :+1:
Will have a look later... im sure we can solve it
This is already merged in https://github.com/basz/SlmLocale/pull/87
Implemented feature described in this comment.
A set of mappings can be defined to map a detected locale or generic language to the one to actually use.
Most common use case is to support and detect a generic language (e.g. "en"), but have a specific locale be set (e.g. "en-US") for all locales that match the generic one.