Skip to content

Arabic language option doesn't work directly with num2words command #394

@adilmujeeb

Description

@adilmujeeb

As per num2words usage, below is the format:
num2words [options]
The language option is -l --lang= and for Arabic language ar should be specified under value.
When tried, it gave error and display usage:
$ num2words --lang=ar 10
10'Num2Word_AR' object has no attribute 'str_to_number'

So I used a wrapper script with below contents and run with python3 script.py and it worked:

------------------8<-----------------------
from num2words import num2words
from sys import argv

words = num2words(10, lang='ar', to ='cardinal')

print(words)
------------------8<-----------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions