Skip to content

Conversation

@ubparviz
Copy link

@ubparviz ubparviz commented May 24, 2025

Added by Parviz

Added full Uzbek language support to Num2Words

This PR introduces comprehensive support for the Uzbek (uz) language, including:

  1. Cardinal numbers — Converts integers and decimals into proper Uzbek words (e.g. 145 -> bir yuz qirq besh).
  2. Currency support — Reads over 20 major currencies like USD, EUR, RUB, and UZS in Uzbek (e.g. 123.45 USD -> bir yuz yigirma uch dollar qirq besh sent).
  3. Ordinal numbers — Implements to_ordinal method to convert numbers like "3 -> uchinchi, 21 -> yigirma birinchi".

This significantly improves the localization capabilities of Num2Words and adds value for Uzbek-speaking developers and applications.

Let me know if adjustments or improvements are needed. Thanks!

Status

  • READY
  • HOLD
  • WIP (Work-In-Progress)

How to verify this change

from num2words import num2words
print(num2words(42, lang='uz'))  # qirq ikki
print(num2words(5.05, lang='uz', to='currency', currency='UZS'))  # besh soʻm, nol besh tiyin
print(num2words(2025, lang='uz', to='ordinal')) # ikki ming yigirma beshinchi

Additional notes

I decided to add this language because the number of Uzbeks in the world is now approaching 50 million. It clearly reads the numbers you enter in pure Uzbek.

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