limist/py-moneyed — pull request #16 by mariocesar (2013-07-27 22:14:01+00:00)
Title: Bolivian localization

Simple adds the currency for Bolivia.

As a workaround in my code I was doing to setup moneyed with a new Currency the following:

import moneyed
from moneyed.localization import _FORMATTER
from decimal import ROUND_HALF_EVEN

BOB = moneyed.add_currency(
code='BOB',
numeric='068',
name='Peso boliviano',
countries=('BOLIVIA', )
)

# Currency Formatter will output 2.000,00 Bs.
_FORMATTER.add_sign_definition(
'default',
BOB,
prefix=u'Bs. '
)

_FORMATTER.add_formatting_definition(
'es_BO',
group_size=3, group_separator=".", decimal_point=",",
positive_sign="", trailing_positive_sign="",
negative_sign="-", trailing_negative_sign="",
rounding_method=ROUND_HALF_EVEN)