locale.currency()

locale.currency(val, symbol=True, grouping=False, international=False)

Formats a number val according to the current LC_MONETARY settings.

The returned string includes the currency symbol if symbol is true, which is the default. If grouping is true (which is not the default), grouping is done with the value. If international is true (which is not the default), the international currency symbol is used.

Note that this function will not work with the ā€˜Cā€™ locale, so you have to set a locale via setlocale() first.

doc_python
2016-10-07 17:35:56
Comments
Leave a Comment

Please login to continue.