twitter/twitter-cldr-js

Decouple javascript code from locale data?

Closed this issue · 3 comments

Hey guys,

This is a question, not an issue. So, forgive me if I should have used another channel for that.

You currently embed CLDR data into your javascript via this.tokens variables.

Have you considered decoupling it, and have JSON CLDR data loaded by the javascript instead? It would help you to reduce re-work (rebuild) maintenance, and also would give users more flexibility (avoiding stuff like #11).

Hey @rxaviers, the short answer is yes, I have considered it. I think it's a great idea, and probably what I should have done from the beginning. Unfortunately I don't have time to refactor the code to make a change as broad-sweeping as that, but I would certainly welcome a pull request if you've got some extra time and inclination. Also happy to answer any questions about the codebase. Thanks for your interest :)

Awesome!

Currently, I am working on the jQuery Globalize's port to CLDR, and I will eventually have some time after I finish that (will let you know). In the meanwhile, I just wanted to point out we may be able to use the same "low level library" to help access the official CLDR JSON data. Thank you for your attention and willingness.

This has hit master thanks to @radzinzki.