mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
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:
committed by
Ernesto Rodriguez Ortiz
parent
ee9f767b06
commit
5a131fedc6
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user