Fork me on GitHub

Introduction

Typically, applications store text resources in Java property files. Sophisticated mechanisms are provided to support multiple languages with fallback mechanisms in case a resource is not available for a certain language or even a complete language is not available.

The management of these text resource files is tedious and error prone. Typically, developers fill in draft values for one language. The customer will later give feedback and request changes. Additionally, the customer or a translation office will deliver other language sets. These exchanges between developer and customer typically happen multiple times.

The Java property file format is not appropriate for this exchange for several reasons.

  • Keys and values are not stored in a tabular way. Therefore, the file cannot be opened by non-techies with a standard tool such as MS Excel
  • There is no possibility to add meta information to the single resources as where it is being used, what the current state of the translation is, etc.
  • Merging of different versions of these property files can be very tedious, e.g. if the translator completely reordered the resources within the file

For these reasons Netcetera developed Trema, a tool to manage multilanguage application text resources.

Trema stores these resources in the Trema database, which is an xml file. The database contains text keys and values. Values for each key might be present in one or several languages. Additionally the database contains metadata about the text resources.

The Trema Eclipse Plugin allows developers to edit the text resources in the database. Additionally, it allows to export and import the texts to/from xls files. These xls files are used to get translation work done: The translator adds translated values to the xls file (translating values as provided by the developer in the 'master language'). The xls file can then be imported back into the trema database by the developer.

In order to make the text resources available to the application, exporting the database into application specific resource files is done at build time using the Trema Maven Plugin. Currently the plugin allows to export the database into Java properties and Android string.xml files.

The following picture shows an overview of how the two parts of the tool work.

Overview

Usage

General instructions on how to use the Trema Eclipse Plugin can be found on the Usage page.

Documentation about the Trema Maven Plugin is available on the Trema Maven Plugin site.

If you encounter any issues with Trema please don't hesitate to create a new issue in our Trema Eclipse Github Page.