I want to localize numbers by spelling them out with a locale and ended up using ICU4J. I succeeded in many locales but didn't seem to get it done for a few like Georgian, Turkish or Arabic.
ULocale locale = new ULocale("Tr"); //Turkish
Double d = Double.parseDouble(input);
NumberFormat formatter = new RuleBasedNumberFormat(locale, RuleBasedNumberFormat.SPELLOUT);
String result = formatter.format(d);
When I debug the ruleset inside by formatter object seems empty and it prints out in English(as default I guess).
In ICU website it is written that: ICU provides number spellout rules for several locales, but not for all of the locales that ICU supports, and not all of the predefined rule types. Also, as of release 2.6, some of the provided rules are known to be incomplete.
But it seems ICU's own demo page can do it for that locales too(http://demo.icu-project.org/icu4jweb/numero.jsp)
I also can locate .res files in the icu5j-53.1.jar under my .m2 folder (\icu4j-53.1\com\ibm\icu\impl\data\icudt53b\rbnf)
Would appreciate any help about how the demo page can manage to do it and why I can't?