Long form for currency name is optional. Currency name rendering in e… (#133)

* Long form for currency name is optional. Currency name rendering in english.

* Missing encoding header.
This commit is contained in:
Mārtiņš Šulcs
2017-11-06 00:59:25 +02:00
committed by Ernesto Rodriguez Ortiz
parent ee9f767b06
commit 5a131fedc6
8 changed files with 146 additions and 25 deletions

View File

@@ -86,7 +86,10 @@ class Num2Word_EN(lang_EU.Num2Word_EU):
return self.to_splitnum(val, hightxt="hundred", jointxt="and",
longval=longval)
def to_currency(self, val, longval=True):
def to_currency(self, val, longval=True, **kwargs):
if 'currency' in kwargs:
return self._to_currency(val, **kwargs)
return self.to_splitnum(val, hightxt="dollar/s", lowtxt="cent/s",
jointxt="and", longval=longval, cents=True)