1 // ***************************************************************************
3 // * Copyright (C) 2004, International Business Machines
4 // * Corporation and others. All Rights Reserved.
6 // ***************************************************************************
10 //------------------------------------------------------------
11 // Rule Based Number Format Support
12 //------------------------------------------------------------
14 // * Spellout rules for Spanish. The Spanish rules are quite similar to
15 // * the English rules, but there are some important differences:
16 // * First, we have to provide separate rules for most of the twenties
17 // * because the ones digit frequently picks up an accent mark that it
18 // * doesn't have when standing alone. Second, each multiple of 100 has
19 // * to be specified separately because the multiplier on 100 very often
20 // * changes form in the contraction: 500 is "quinientos," not
21 // * "cincocientos." In addition, the word for 100 is "cien" when
22 // * standing alone, but changes to "ciento" when followed by more digits.
23 // * There also some other differences.
25 // The Spanish rules are incomplete. I'm missing information on negative
26 // numbers and numbers with fractional parts. I also don't have
27 // information on numbers higher than the millions.
30 // negative-number and fraction rules
33 // words for values from 0 to 19
34 "cero; uno; dos; tres; cuatro; cinco; seis; siete; ocho; nueve;\n"
35 "diez; once; doce; trece; catorce; quince; diecis\u00e9is;\n"
36 " diecisiete; dieciocho; diecinueve;\n"
37 // words for values from 20 to 29 (necessary because the ones digit
38 // often picks up an accent mark it doesn't have when standing alone)
39 "veinte; veintiuno; veintid\u00f3s; veintitr\u00e9s; veinticuatro;\n"
40 " veinticinco; veintis\u00e9is; veintisiete; veintiocho;\n"
42 // words for multiples of 10 (notice that the tens digit is separated
43 // from the ones digit by the word "y".)
44 "30: treinta[ y >>];\n"
45 "40: cuarenta[ y >>];\n"
46 "50: cincuenta[ y >>];\n"
47 "60: sesenta[ y >>];\n"
48 "70: setenta[ y >>];\n"
49 "80: ochenta[ y >>];\n"
50 "90: noventa[ y >>];\n"
51 // 100 by itself is "cien," but 100 followed by something is "cineto"
54 // words for multiples of 100 (must be stated because they're
55 // rarely simple concatenations)
56 "200: doscientos[ >>];\n"
57 "300: trescientos[ >>];\n"
58 "400: cuatrocientos[ >>];\n"
59 "500: quinientos[ >>];\n"
60 "600: seiscientos[ >>];\n"
61 "700: setecientos[ >>];\n"
62 "800: ochocientos[ >>];\n"
63 "900: novecientos[ >>];\n"
64 // for 1,000, the multiplier on "mil" is omitted: 2,000 is "dos mil,"
65 // but 1,000 is just "mil."
67 "2000: << mil[ >>];\n"
68 // 1,000,000 is "un millon," not "uno millon"
69 "1,000,000: un mill\u00f3n[ >>];\n"
70 "2,000,000: << mill\u00f3n[ >>];\n"
72 "1,000,000,000: =#,##0= (incomplete data);"