-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API for BCP 47 language tags #5
Comments
Given that the algorithms are all in place in the spec, we just need to come up with some kind of shape for this API. Given So, question is, do we just want a bunch of methods off
I'm not sure how to best expose |
No, but only because it would be better to be more specific, eg:
But that's just for illustration at the moment. |
Yeah, I was thinking the above too. Just thought people might get confused with |
|
I would actually like to consider separating Locale object out of Intl object. The Locale object would handle LanguageTag operations like canonicalize and validation plus it would handle Language Negotiation. Mostly, it would take out all of the locale related code that is right now hidden inside Intl API, and expose it. Then Intl API would use Locale API, and localization API would also be able to use it. Here's an example of how it might look like: https://raw.githubusercontent.com/zbraniecki/l20n.js/v3-webl10n/examples/api/js/locale.js |
@caridy - what's your take on |
Lookup matchers etc would be helpful in implementing |
@zbraniecki we had a quick side conversation about this today at TC39, I plan to get more bikeshedding on the next two days, and we can make a decision about where to put them. As for help and guidance, you will get all the help you need if you're willing to champion this for the November meeting when we plan to push for many Intl stuff for the 3rd edition, I promise. |
cool. I'll be at the Nov meeting btw! Can you point me to any docs on how to design a spec? |
Proposed |
(cloned from bugzilla)
The ECMAScript Internationalization API Specification describes a number of abstract operations to process BCP 47 language tags. Some of them might be useful to expose as public API:
The text was updated successfully, but these errors were encountered: