You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use babel to convert numbers into locale-defined characters. For example in zh_TW, 1350 is represented as 一千三百五十. Your format_decimal(1350, locale='zh_TW') returns 1350.
The text was updated successfully, but these errors were encountered:
This was somewhat implemented in #470 (which would need rebasing), but we'd also need to be very careful with backward compatibility; a Babel version upgrade can't have numbers start getting spelled differently...
Thanks - it's not a 1-to-1 mapping though. For example, several languages (e.g. Chinese, which is also used in Japanese) have digits for 10, 100, 1000, etc, so you write 1350 as One Thousand (一千) Three Hundred (三百) Five Tens (五十). Ref: https://en.wikibooks.org/wiki/Chinese_(Mandarin)/Numbers
@akx maybe follow Excel’s lead where they add [DBNumN] to the number format to use locale digits, ie add an extra parameter to format_decimal to enable it.
I would like to use babel to convert numbers into locale-defined characters. For example in zh_TW, 1350 is represented as
一千三百五十
. Yourformat_decimal(1350, locale='zh_TW')
returns1350
.The text was updated successfully, but these errors were encountered: