GithubHelp home page GithubHelp logo

Add Internationalization about maya HOT 6 OPEN

kennethreitz avatar kennethreitz commented on August 18, 2024
Add Internationalization

from maya.

Comments (6)

kennethreitz avatar kennethreitz commented on August 18, 2024

No plans at this time! I'm fine with only supporting English, as it seems to be the "esperanto" of the internet — i think a great approach might to be a wrapper that translates the french/italian/etc/etc into english and then runs it through the parser.

from maya.

moin18 avatar moin18 commented on August 18, 2024

I think we can utilize the internationalization support from the pendulum library. Anyway maya has a dependency on pendulum

from maya.

kennethreitz avatar kennethreitz commented on August 18, 2024

@moin18 have an API proposal?

from maya.

alxwrd avatar alxwrd commented on August 18, 2024

I've had a look into this and it seems dateparser supports parsing different languages, so therefore maya's .when() will too.

>>> import maya
>>> maya.when("2日前").slang_time()
'2 days ago'
>>> maya.when("il y a 2 jours").slang_time()
'2 days ago'
>>> maya.when("Vor 2 Tagen").slang_time()
'2 days ago'

For slang_time/date pendulum does have support for human output in different locales, but only for time. I will open a PR to discuss the changes.

from maya.

timofurrer avatar timofurrer commented on August 18, 2024

@alxwrd Sounds great!

from maya.

github-actions avatar github-actions commented on August 18, 2024

This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

from maya.

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.