Skip to content

Adding Uzbek language support#658

Open
activuz wants to merge 2 commits into
savoirfairelinux:masterfrom
activuz:master
Open

Adding Uzbek language support#658
activuz wants to merge 2 commits into
savoirfairelinux:masterfrom
activuz:master

Conversation

@activuz
Copy link
Copy Markdown

@activuz activuz commented May 23, 2026

Description

This Pull Request introduces comprehensive support for the Uzbek (uz) language in the num2words library, fully adhering to native Uzbek linguistic and grammatical rules.

Key Changes:

  • num2words/lang_UZ.py: Created a new language module containing specific rules for Uzbek syntax (such as omitting the prefix "bir" for numbers like 1,000 -> "ming" and 100,000 -> "yuz ming").
  • num2words/__init__.py: Added the Uzbek language mapping (uz) to the main language dictionary.
  • tests/test_uz.py: Added comprehensive unit tests to ensure all edge cases for Uzbek numbers work properly.
  • tests/demo.py: Created a temporary script to quickly preview and demonstrate how num2words handles Uzbek and other languages.

Testing & Verification

I have manually and automatically tested the implementation with various number ranges (including large numbers, decimals, and negative values). All test cases pass successfully, and the program runs perfectly.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my feature works

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant