rodionmoiseev / c10n

A Java library, focused on making internationalisation more modular, easier to evolve and maintain, robust-to-change and IDE-friendly without excess of external tools.
Apache License 2.0
67 stars 10 forks source link

Use ICU4J #38

Closed lelmarir closed 8 years ago

lelmarir commented 8 years ago

I'd like to propose to use com.ibm.icu.text.MessageFormat instead of java.text.MessageFormat.

http://www.stuartgunter.org/even-better-java-i18n-pluralisation-using-icu4j/

rodionmoiseev commented 8 years ago

Thank you for the feedback!

In c10n I have originally provided a way to customize the behaviour of MessageFormat, but it currently does not pass around the Locale object, which seems to be required to use ICU4J. I will consider extending it to cover for this case.

rodionmoiseev commented 8 years ago

It should be possible to integrate ICU4J to use with c10n. You can get an idea on how to implement your custom message formatter here

This feature is currently only available in the latest 1.3-SNAPSHOT version.