i18n – Keep your messages in a sane format

In order to provide localized messages you have to provide the messages in the properties files in ASCII (or ISO8859-1) encoding with any unicode character escaped in a special form. For maintainance this is a pain in the butt.

But i18n to the rescue. It allows to keep your messages files in a sane encoding (read: UTF-8) for ease of editing. Only on building the application the files are translated into the format required by the Java runtime.


  1. Put your messages files under src/<sourceset>/i18n.
  2. Add the plugin to your build.gradle: apply plugin: 'i18n'
  3. Run your build.
  4. Have a properly localized application.

The plugin is a available from

repositories {
    mavenRepo :urls ''

dependencies {
    classpath "i18n:i18n:<version>"