Add Nepali language support (ne, en_NE) with Devanagari script and test coverage#652
Open
sparshrestha wants to merge 2 commits intosavoirfairelinux:masterfrom
Open
Conversation
…, ordinal and currency conversions
Author
|
@savoirfairelinux @mrodriguezg1991 |
S-mkc
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds new language support for both the Nepali numbering system (in Devanagari script) and the English (Nepal) words.
Changes proposed in this pull request:
lang_NE.py- Native Nepali (ne) with Devanagari script outputlang_EN_NE.py- English (Nepal) variant (en_NE)Testing:
tests/test_ne.py- Devanagari testsउनान्सय हजार नौ सय उनान्सयtests/test_en_ne.py- English (Nepal) variant testsone crore, twenty-three lakh, forty-five thousand, six hundred and seventy-eightNepali (
ne) Features:is_int_with_cents=FalseEnglish Nepal (
en_NE) Features:Num2Word_ENbase with modified scale dictionaryStatus
How to verify this change
Run tests locally:
Additional notes
If applicable, explain the rationale behind your change.
The dual implementation (ne for native Devanagari, en_NE for English with Nepali numbering) addresses both official documentation needs and business communication contexts where English text follows Nepali's lakh/crore conventions. This closes a critical gap in South Asian language support, enabling proper localization of accounting software (eg: Frappe ERPNext), banking applications, and government e-governance systems serving Nepal's market.
Integration with Frappe Framework:
The Frappe Framework already implements Nepali number system formatting for display purposes (see frappe/public/js/frappe/utils/number_systems.js) with abbreviations like Kh (Kharba), Ar (Arba), Cr (Crore), and L (Lakh).
However, the critical in_words() function in frappe/utils/data.py cannot convert Nepali numbers to words because
num2wordslacksneoren_NElocale support.This PR directly addresses it. Once merged, ERPNext and Frappe-based applications can properly generate invoices, purchase orders, and payment vouchers with Nepali word representations. The implementation follows Frappe's existing pattern where get_number_system('Nepal') returns the Nepali system, but extends it to actual word conversion rather than just display formatting.
Also, extends to #548
References:
Nepali numbers (नेपाली गणना)
Numbers in Nepali language - Wikipedia