Kilt — Kilt I18n L10n T9n

Easier handling of Java I18n resource bundles

Kilt is a set of small tools to ease the handling of Java i18n resource bundles.

It can help by

  • Converting i18n resource bundles to and from XLS(X) sheets for easier translation by a small translation team.
  • Providing a facade to access the entries in a i18n resource bundle statically in a type safe way.
  • Reformat and reorder entries in resource bundles to maintain a constant style and order.

Short Usage

Create facade for accessing translation keys

  1. For resource bundle i18n/msg.properties
1ok      = OK
2cancel  = Cancel
3yes     = Yes
4no      = No
5
6
7
  1. Generate the facade
1 ./kilt.sh create-facade \
2           -i msg.properties
34567
  1. Then use the generated facade
1final I18n i18n= new I18n();
2
3String s;
4s = i18n.get(Msg.CANCEL);
5s = i18n.get(Msg.OK);
6Locale.setDefault(Locale.GERMAN);
7s = i18n.get(Msg.CANCEL);

Export XLS(X) sheet for translation

  1. For all your resource bundles
1i18n/msg.properties
2i18n/msg_de.properties
3i18n/msg_nl.properties
  1. Export them to a single XLS sheet
1 ./kilt.sh export-xls \
2           -i "msg*.properties"
3
  1. Then sent it to translators
123

Import XLS(X) sheet with translations

  1. (Re)import XLS file with translations
1 ./kilt.sh import-xls \
2           -i "msg*.properties"
345
  1. This updates the resource bundles
1i18n/msg.properties
2i18n/msg_de.properties
3i18n/msg_nl.properties
4i18n/msg_fr.properties
5
  1. Then use the new translations
1final I18n i18n= new I18n();
2
3String s:
4Locale.setDefault(Locale.FRENCH)
5s = i18n.get(Msg.CANCEL)

See the User Guide for a more thorough explanation of the possibilities.

License

Kilt is licensed under the terms of the Apache license 2.0.