Giter VIP home page Giter VIP logo

Comments (7)

dustin avatar dustin commented on August 23, 2024 2

I agree. Every time I've thought about how to do this, it's been essentially what you described -- write a new library. There's so much involved in dealing with all the different locale-specific ways to represent the data. There are a few high level formatters that can be rearranged in specific applications, but I haven't been able to figure out how to fit in localized variations (and I'm not even that familiar with most of them, just enough to make it seem really complex).

from go-humanize.

PabloCastellano avatar PabloCastellano commented on August 23, 2024 2

Is there any similar lib with i18n support nowadays?

from go-humanize.

dmitshur avatar dmitshur commented on August 23, 2024 1

Personally, I don't think we should add i18n here. The amount of volume and work to create and maintain it would be huge, and overshadow the size of this entire library as it is now. It's relatively small and focused because it's English-only.

I think that if someone wanted an i18n-capable version of this, it would be best done as a new separate package (and go-humanize README can link to it). When a feature request is more than 100% of scope of existing project, it doesn't feel right to just add it in.

So, I would advise against doing this. If it's not going to be actively developed and maintained, a half-baked partial i18n support is only going to complicate the library, and not provide enough value to people who actually want to make use of it. It's better to stay small and focused and high quality.

Of course, it's up to @dustin, but I'm judging by lack of response and progress on this issue/PR after 3 years that it's not going to be a good fit.

What do you think about making adding it to your own version of a similar library @jfbus? That way, you can also change the APIs to be a better fit, if neccessary.

from go-humanize.

jfbus avatar jfbus commented on August 23, 2024

I can submit a PR

from go-humanize.

dmitshur avatar dmitshur commented on August 23, 2024

@dustin, is i18n in scope for this project or out of scope?

from go-humanize.

jfbus avatar jfbus commented on August 23, 2024

If necessary, I can update my PR.

from go-humanize.

jfbus avatar jfbus commented on August 23, 2024

OK. I'll try to work on an i18n compatible lib.

from go-humanize.

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.