3
Requires: num2word_base.py
7
Taro Ogawa (tso@users.sourceforge.org)
10
Copyright (c) 2003, Taro Ogawa. All Rights Reserved.
13
This module is distributed under the Lesser General Public Licence.
14
http://www.opensource.org/licenses/lgpl-license.php
17
http://www.uni-bonn.de/~manfear/large.php
20
1.1: add to_currency()
22
from num2word_base import Num2Word_Base
24
class Num2Word_EU(Num2Word_Base):
25
def set_high_numwords(self, high):
28
for word, n in zip(high, range(max, 3, -6)):
29
self.cards[10**n] = word + "illiard"
30
self.cards[10**(n-3)] = word + "illion"
34
lows = ["non","oct","sept","sext","quint","quadr","tr","b","m"]
35
units = ["", "un", "duo", "tre", "quattuor", "quin", "sex", "sept",
37
tens = ["dec", "vigint", "trigint", "quadragint", "quinquagint",
38
"sexagint", "septuagint", "octogint", "nonagint"]
39
self.high_numwords = ["cent"]+self.gen_high_numwords(units, tens, lows)
41
def to_currency(self, val, longval=True, jointxt=""):
42
return self.to_splitnum(val, hightxt="Euro/s", lowtxt="Euro cent/s",
43
jointxt=jointxt, longval=longval)