-
Notifications
You must be signed in to change notification settings - Fork 451
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
Adjust Persian locale numbers (fa_IR) #446
Comments
There are a bunch of problems in this ticket.
Regarding 3. Incorrect number symbols/separators Ahh, the code that parses number symbols doesn't account for different number systems.
In the CLDR, fa_IR.xml doesn't define number symbols, so it inherits from fa.xml, which specifies the latn number system last. Which means these elements will be processed last, which means they're the ones that 'stick'.
This is a bug. |
Regarding 1. Converting Arabic numerals to Persian numerals It looks like data for this conversation is supported in the CLDR, but it's not currently read into Babel. IMO this is a feature request. |
Regarding 2. Incorrect currency symbol
Which is different from @5j9 's requested symbol '﷼' CLDR 28 defines the currency symbol for the Iranian Rial as
It's the same in trunk as well. :( @5j9 - unfortunately, we get this data from the Unicode Consortium. If you want to show a different symbol, you'll have to override it yourself. |
FYI: although "﷼" and "ریال" look the same here on GitHub (and possibly other browser/console windows), they are not the same. The first is:
The second is:
CLDR has the second form in |
- Load number symbols for multiple number systems from cldr data - Add numbering_systems and default_numbering_system properties for Locale - Use default numbering system of the locale for formatting number symbols Fixes partially issue python-babel#446
- Load number symbols for multiple number systems from cldr data - Add numbering_systems and default_numbering_system properties for Locale - Use default numbering system of the locale for formatting number symbols Fixes partially issue python-babel#446
- Load number symbols for multiple number systems from cldr data - Add numbering_systems and default_numbering_system properties for Locale - Use default numbering system of the locale for formatting number symbols Fixes partially issue python-babel#446
- Load number symbols for multiple number systems from cldr data - Add numbering_systems and default_numbering_system properties for Locale - Use default numbering system of the locale for formatting number symbols Fixes partially issue python-babel#446
- Load number symbols for multiple number systems from cldr data - Add numbering_systems and default_numbering_system properties for Locale - Use default numbering system of the locale for formatting number symbols Fixes partially issue python-babel#446
- Load number symbols for multiple number systems from cldr data - Add numbering_systems and default_numbering_system properties for Locale - Use default numbering system of the locale for formatting number symbols Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Fixes partially issue python-babel#446
- Import number symbols for available numbering systems from cldr data - Add default_numbering_system and other_numbering_systems properties for Locale - Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system Refs #446 Co-authored-by: Aarni Koskela <akx@iki.fi>
@akx This issue has been open for a long time, and I’m curious about the plans to implement this? The Persian and Arabic numbers are also relevant for dates, e.g. >>> import datetime
>>>
>>> today = datetime.date.today()
>>> today
datetime.date(2024, 7, 13)
>>>
>>> import babel.dates
>>> print(babel.dates.format_date(today, format='full', locale='ar'))
السبت، 13 يوليو 2024 should also use Arabic numerals. Furthermore, regarding the comment above the relevant CLDR transformer file has moved to Github here. |
Currently:
What I was expecting:
Also the current currency symbol is "﷼" and the "%" sign is "٪".
I'm using Python 3.5.2 64 bit on a Windows 10 machine.
Thanks!
The text was updated successfully, but these errors were encountered: