Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Num2words Nepali number system format support. #23636

Open
ajiragroup opened this issue Dec 6, 2023 · 2 comments
Open

Num2words Nepali number system format support. #23636

ajiragroup opened this issue Dec 6, 2023 · 2 comments

Comments

@ajiragroup
Copy link
Contributor

As per my understanding, Frappe uses Num2words library to convert number into words (especially needed for currency). The num2words library already has lang_EN_IN locale setup which works fine if country is set to India.

In Nepal, numbering format is similar to Indian except that we do not stop at Crore. For something that Indian system would return 100 Cr is actually 1 Arba in Nepali system. Nepali system goes well beyond 10^30. However such a large number would practically not be needed. In our case we have felt need to accommodate 10^12 place (just in case). A number - 10^11 would be called 1 Kharba which is 10,000 Cr.

To accommodate this changes we have made changes and sent a PR for num2words by making changes to existing Indian system.
savoirfairelinux/num2words#548
But it looks like this library is not actively maintained. Under this circumstances, how can we integrate this change into Frappe ?

It is possible to implement these changes in Frappe before the PR gets merged in the num2words library ?

@ankush
Copy link
Member

ankush commented Dec 11, 2023

@ajiragroup you can monkey-patch the library to dynamically add en_NP in their converters.

@ajiragroup
Copy link
Contributor Author

I believe that would only affect my local instance and this will not apply to the whole Frappe community until it is actually merged in num2words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants