Zbigniew Braniecki (2013-07-15T19:51:07.000Z)
----- Original Message -----
> Would you expect to support the same locales as Intl constructors in your
> library?

Yes.

>  Can you safely make that assumption?

I'd have to think more about edge cases, but my initial reaction is - yes.


> Canonicalisation makes sense because I would expect a library to
> canonicalise the tag and then try and load the file containing relevant
> data whether the native API supports it or not. Forgive me if I'm
> misunderstanding something, I didn't have a look at your project in great
> detail.

There's no need to look at my project. All I'm asking is to talk about exposing the API for negotiating between locales provided by the application and locales requested by the user with the result being the list of available locales that the user wants sorted by the user preference.

That enables us to load the locale 0 and fallback to locale 1 and then to locale 2 etc.

The only crucial point here is that we need to operate on the list of available locales, not requested, because we will be selecting from the available ones.

Cheers,
g.
domenic at domenicdenicola.com (2013-07-16T00:16:36.935Z)
> Would you expect to support the same locales as Intl constructors in your library?

Yes.

>  Can you safely make that assumption?

I'd have to think more about edge cases, but my initial reaction is - yes.

> Canonicalisation makes sense because I would expect a library to
> canonicalise the tag and then try and load the file containing relevant
> data whether the native API supports it or not. Forgive me if I'm
> misunderstanding something, I didn't have a look at your project in great
> detail.

There's no need to look at my project. All I'm asking is to talk about exposing the API for negotiating between locales provided by the application and locales requested by the user with the result being the list of available locales that the user wants sorted by the user preference.

That enables us to load the locale 0 and fallback to locale 1 and then to locale 2 etc.

The only crucial point here is that we need to operate on the list of available locales, not requested, because we will be selecting from the available ones.