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
Babel allows to "speak" any locale but no to understand other locales.
Similar to get_currency_name() and get_currency_symbol() from the currency code, there should be a method allowing to get the currency code from the symbol, e.g.
---> 21 from babel.numbers import parse_currency
22 # from babel.numbers import get_currency_code
ImportError: cannot import name 'parse_currency'
Can you please help me out to fix this?
During cldr import the `currency_codes` mapping is created on `data` and
internally exposed by the `Locale.currency_codes` property.
The `numbers.get_currency_code` API is made available to convert a
currency symbol into a currency code.
Partially addresses issue python-babel#141
Babel allows to "speak" any locale but no to understand other locales.
Similar to get_currency_name() and get_currency_symbol() from the currency code, there should be a method allowing to get the currency code from the symbol, e.g.
Even better would be a reverse method to format_currency(), e.g.
I see that "Locale.parse(locale).currency_symbols" already contains the required mapping for this.
Cheers, Simon
The text was updated successfully, but these errors were encountered: