Skip to main content

A python library for translating numbers to numeric representation in another language.

Project description

pynum-translator

A python library for translating numbers to numeric representation in another language.

Supported Languages

The following languages are supported.

SL# Language Code Name Alphabets
1 en English 0123456789
2 hi Hindi ०१२३४५६७८९
3 or Oriya ୦୧୨୩୪୫୬୭୮୯

Installation

Using PIP : pip install pynum-translator

Example Usage

Find below some examples

>> # Import the module
>> from pynum_translator import Translator

>> # Try the Hindi Translator
>> hi_translator = Translator(lang="hi")
>> print(hi_translator.translate(123))
१२३
>> print(hi_translator.translate(76.05))
६७.०५

>> # Try the Oriya Translator
>> or_translator = Translator(lang="or")
>> print(or_translator.translate(123))
୧୨୩
>> print(or_translator.translate("456"))
୪୫୬
>> print(or_translator.translate("There are 456 ducks in the zoo!"))
There are ୪୫୬ ducks in the zoo!

Contributing

PRs welcome !

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pynum-translator, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size pynum_translator-0.0.2-py3-none-any.whl (5.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pynum-translator-0.0.2.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page