Git Product home page Git Product logo

Comments (9)

nicolas-grekas avatar nicolas-grekas commented on August 16, 2024

symfony/intl does have a NumberFormatter implementation. I didn't check, but is commerceguys' better?
As far as I read correctly, both symfony/intl and commerceguys/intl provide polyfilling and add features on top. It would be great to have the pure polyfill part of each here. Would someone like to give it a try?

from polyfill.

bojanz avatar bojanz commented on August 16, 2024

No, the symfony/intl one doesn't do any actual formatting, it just tries to mimic the API.
The commerceguys one uses the CLDR/ICU number formats the do the same formatting the intl extension does.

from polyfill.

nicolas-grekas avatar nicolas-grekas commented on August 16, 2024

Then it could be interesting to have ext-intl ∩ (commerceguys/intl ∪ symfony/intl) here if someone wants to work on it!

from polyfill.

bojanz avatar bojanz commented on August 16, 2024

Merging the two NumberFormatters (to get the API and the logic) is a small task.

The bigger one is figuring out what to do with the data storage, since this repo would need to ship with the CLDR / ICU currency and number format data. That was previously symfony/intl territory*, so it needs discussion.

*symfony/intl ships with the currency data, but not with the number format data. There's an open issue about that.

from polyfill.

nicolas-grekas avatar nicolas-grekas commented on August 16, 2024

it is possible to get access to the data by using ext-intl only? if yes, we could move it here and make symfony/intl free from them (and rely only on the ext-intl interfaces, polyfilled or not)

from polyfill.

bojanz avatar bojanz commented on August 16, 2024

No, it's not. Both commerceguys/intl and symfony/intl have scripts that parse the data (downloaded from CLDR or ICU) and output JSON definitions.

from polyfill.

nicolas-grekas avatar nicolas-grekas commented on August 16, 2024

@bojanz would you like to submit a PR here adding NumberFormatter?

from polyfill.

bojanz avatar bojanz commented on August 16, 2024

I won't have time for that in the foreseeable future, sorry.

from polyfill.

nicolas-grekas avatar nicolas-grekas commented on August 16, 2024

How, no pb. Closing then.

from polyfill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.