public static final String ruleSet_en_US =
/*
* These rules format a number in one of the two styles often used
* on checks. %dollars-and-hundredths formats cents as hundredths of
* a dollar (23.40 comes out as "twenty-three and 40/100 dollars").
* %dollars-and-cents formats in dollars and cents (23.40 comes out as
* "twenty-three dollars and forty cents")
*/
"%dollars-and-cents:\n"
+ " x.0: << [and >%%cents>];\n"
+ " 0.x: >%%cents>;\n"
+ " 0: zero dollars; one dollar; =%%main= dollars;\n"
+ "%%main:\n"
+ " zero; one; two; three; four; five; six; seven; eight; nine;\n"
+ " ten; eleven; twelve; thirteen; fourteen; fifteen; sixteen;\n"
+ " seventeen; eighteen; nineteen;\n"
+ " 20: twenty[->>];\n"
+ " 30: thirty[->>];\n"
+ " 40: forty[->>];\n"
+ " 50: fifty[->>];\n"
+ " 60: sixty[->>];\n"
+ " 70: seventy[->>];\n"
+ " 80: eighty[->>];\n"
+ " 90: ninety[->>];\n"
+ " 100: << hundred[ >>];\n"
+ " 1000: << thousand[ >>];\n"
+ " 1,000,000: << million[ >>];\n"
+ " 1,000,000,000: << billion[ >>];\n"
+ " 1,000,000,000,000: << trillion[ >>];\n"
+ " 1,000,000,000,000,000: =#,##0=;\n"
+ "%%cents:\n"
+ " 100: <%%main< cent[s];\n"
+ "%dollars-and-hundredths:\n"
+ " x.0: <%%main< and >%%hundredths>/100;\n" + "%%hundredths:\n"
+ " 100: <00<;\n";
public static final String ruleSet_th_TH =
/*
* These rules format a number in one of the two styles often used
* on checks. %bahts-and-hundredths formats stangs as hundredths of
* a baht (23.40 comes out as "twenty-three and 40/100 bahts").
* %bahts-and-stangs formats in bahts and stangs (23.40 comes out as
* "twenty-three bahts and forty stangs")
*/
"%bahts-and-stangs:\n"
+ " x.0: << [and >%%stangs>];\n"
+ " 0.x: >%%stangs>;\n"
+ " 0: zero bahts; one baht; =%%main= bahts;\n"
+ "%%main:\n"
+ " zero; one; two; three; four; five; six; seven; eight; nine;\n"
+ " ten; eleven; twelve; thirteen; fourteen; fifteen; sixteen;\n"
+ " seventeen; eighteen; nineteen;\n"
+ " 20: twenty[->>];\n"
+ " 30: thirty[->>];\n"
+ " 40: forty[->>];\n"
+ " 50: fifty[->>];\n"
+ " 60: sixty[->>];\n"
+ " 70: seventy[->>];\n"
+ " 80: eighty[->>];\n"
+ " 90: ninety[->>];\n"
+ " 100: << hundred[ >>];\n"
+ " 1000: << thousand[ >>];\n"
+ " 1,000,000: << million[ >>];\n"
+ " 1,000,000,000: << billion[ >>];\n"
+ " 1,000,000,000,000: << trillion[ >>];\n"
+ " 1,000,000,000,000,000: =#,##0=;\n"
+ "%%stangs:\n"
+ " 100: <%%main< stang[s];\n"
+ "%bahts-and-hundredths:\n"
+ " x.0: <%%main< and >%%hundredths>/100;\n" + "%%hundredths:\n"
+ " 100: <00<;\n";
public static HashMap<Locale, String> rbnfRuleSets;
static {
rbnfRuleSets = new HashMap<Locale, String>();
rbnfRuleSets.put(Locale.US, ruleSet_en_US);
rbnfRuleSets.put(new Locale("th"), ruleSet_th_TH);
}