mirumee / django-prices

Django fields for the prices module
158 stars 53 forks source link

Korean won is displayed "3300,000 원" #33

Closed pcompassion closed 8 years ago

pcompassion commented 8 years ago

when locale is Locale('ko', territory='KR')

Currently, displayed as "원 3300000.00"

patrys commented 8 years ago

It looks like you're using prices_i18n which in turn depends on Babel. Are you sure this bug is in django-prices?

pcompassion commented 8 years ago

oh..

It might be a bug of babel.

babel takes parameters (such as format) django-prices won't pass. So It might be configurable by setting correct parameters though.

2016-02-16 20:10 GMT+09:00 Patryk Zawadzki notifications@github.com:

It looks like you're using prices_i18n which in turn depend on Babel http://babel.pocoo.org/en/latest/. Are you sure this bug is in django-prices?

— Reply to this email directly or view it on GitHub https://github.com/mirumee/django-prices/issues/33#issuecomment-184633438 .

pcompassion commented 8 years ago

actually it is the babeldjango that doesn't accept the whole parameter set..

2016-02-16 20:12 GMT+09:00 eugene kim p.compassion@gmail.com:

oh..

It might be a bug of babel.

babel takes parameters (such as format) django-prices won't pass. So It might be configurable by setting correct parameters though.

2016-02-16 20:10 GMT+09:00 Patryk Zawadzki notifications@github.com:

It looks like you're using prices_i18n which in turn depend on Babel http://babel.pocoo.org/en/latest/. Are you sure this bug is in django-prices?

— Reply to this email directly or view it on GitHub https://github.com/mirumee/django-prices/issues/33#issuecomment-184633438 .

patrys commented 8 years ago

We pass the current locale to Babel's format_currency. For me that's what it returns:

from babel.numbers import format_currency
print(format_currency(3300000, 'KRW', locale='ko_KR'))
# ₩3,300,000
pcompassion commented 8 years ago

oh..

That looks ok.

although we koreans are more accustomed to see 3,300,000 원

I'm closing this is minor issue. (it is better to get the 3,300,000 원 but I guess It is better to talk to babel people)