Skip to content

Commit 1eaa738

Browse files
committed
Add yen (JPY) and won (KRW) for European languages
1 parent 0df2a0e commit 1eaa738

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

num2words/lang_EU.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ class Num2Word_EU(Num2Word_Base):
4747
'HUF': (('forint', 'forint'), ('fillér', 'fillér')),
4848
'ISK': (('króna', 'krónur'), ('aur', 'aurar')),
4949
'UZS': (('sum', 'sums'), ('tiyin', 'tiyins')),
50-
'SAR': (('saudi riyal', 'saudi riyals'), ('halalah', 'halalas'))
50+
'SAR': (('saudi riyal', 'saudi riyals'), ('halalah', 'halalas')),
51+
'JPY': (('yen', 'yen'), ('sen', 'sen')),
52+
'KRW': (('won', 'won'), ('jeon', 'jeon')),
5153

5254
}
5355

@@ -65,7 +67,9 @@ class Num2Word_EU(Num2Word_Base):
6567
'HUF': 'Hungarian',
6668
'ISK': 'íslenskar',
6769
'UZS': 'Uzbekistan',
68-
'SAR': 'Saudi'
70+
'SAR': 'Saudi',
71+
'JPY': 'Japanese',
72+
'KRW': 'Korean',
6973
}
7074

7175
GIGA_SUFFIX = "illiard"

tests/test_en.py

+12
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ def test_to_currency(self):
137137
"two thousand sums and zero tiyins"
138138
)
139139

140+
self.assertEqual(
141+
num2words('2000.00', lang='en', to='currency', separator=' and',
142+
cents=True, currency='JPY'),
143+
"two thousand yen and zero sen"
144+
)
145+
146+
self.assertEqual(
147+
num2words('2000.00', lang='en', to='currency', separator=' and',
148+
cents=True, currency='KRW'),
149+
"two thousand won and zero jeon"
150+
)
151+
140152
def test_to_year(self):
141153
# issue 141
142154
# "e2 e2"

0 commit comments

Comments
 (0)