Test code:
RuleBasedNumberFormat rbnf = new RuleBasedNumberFormat(new Locale("ru"), RuleBasedNumberFormat.SPELLOUT);
System.out.println(rbnf.format(12345.0, new StringBuffer(), null));
prints "двеннадцать тысяча три сто сорок пять", expected "двенадцать тысяч триста сорок пять".
Errors:
1. "двеннадцать" -> "двенадцать"
2. "тысяча" should be "тысяч" - genitive case singular of "тысяча". The rule is: for last "1" numeral should be in nominative case singular ("тысяча", "миллион", "миллиард"), for "2"-"4" should be in genitive case singular ("тысячи", "миллиона", "миллиарда"), for "0" and "5"-"19" should be in genitive case plural ("тысяч", "миллионов", "миллиардов"). For "20" again as for "0", "21" as "1", "30" as "0" and so on.
3. "три сто" should be "триста". It isn't count of hundreds - it is a numeral. Same for other hundreds (200-"двести", 400-"четыреста", 500-"пятьсот").
Please note that every spelled number in Russian can be in 6 grammatical cases and 2 grammatical numbers (singular and plural).
Thus, the only one spelling ruleset isn't enought.
Also please note that a word or a phrase after numeral should be changed according rules described above: "1 RUR - один рубль", "2 RUR - два рубля", "5 RUR - пять рублей". Thus, formatter should either be able to change this word according Russian grammatical rules (ha-ha) or return some information (grammatical case and grammatical number, or last user number).
Feel free to contact me if you have any questions.