Skip to content

User Interface Translation: Contributors' Guide

Rainer Simon edited this page Jun 18, 2018 · 22 revisions

The Recogito user interface is available in different languages. Translations are based on language resource files. These are lists of labels that Recogito inserts into UI components, according to users' browser settings.

When adding support for a new language, we usually create template files, pre-filled with the English labels, and then start to translate them. If you want to help add support for a new translation, or fill gaps in an existing one, contributing via GitHub is easy!

  • Fork the recogito2 code repository to your GitHub account.
  • Add or edit language resource files in your fork
  • Issue a pull request, so we can merge your additions back into the main repository.

Recogito is under active development. As we extend functionality, new user interface components get added. So even if there's nothing to do in the language(s) of your choice at the moment, there might be later. We greatly appreciate any contribution, no matter how big or small!

UI labels for server-rendered page components

Language resource files reside in two different different areas. That's due to a technical distinction between server-generated pages and client-side code, which require different translation approaches. The labels for server-generated pages reside in a single resource file per language.

Language Resource File Status
Dutch conf/messages.nl minor gaps only
Farsi conf/messages.fa minor gaps only
French conf/messages.fr minor gaps only
German conf/messages.de minor gaps only
Greek conf/messages.el minor gaps only
Hebrew conf/messages.he in progress
Italian conf/messages.it minor gaps only
Japanese conf/messages.ja minor gaps only
Spanish conf/messages.es in progress
Turkish conf/messages.tr in progress

UI labels for client-side widgets

Labels for client-side widgets are organized in a different way, according to the component hierarchy of the user interface. Example:

- app/assets/javascripts/common/i18n/document/nls
   - /de
      - annotation.js # German labels
   - /fa
      - annotation.js # Farsi labels
   - /fr
      - annotation.js # French labels
   - annotation.js    # Default English labels for the annotation components
  • The root folder for client-side language resource files is app/assets/javascripts/common/i18n
  • Within that folder you will find (nested) subfolders corresponding to Recogito's different areas - e.g. the folder document/nls for the different document views.
  • The nls folder is (by convention of the localization framework we are using) the folder for the language resources. It contains:
    • One default (English) language resource file per view, e.g. annotation.js
    • One subfolder for each language, named by ISO language code, e.g. de, fa, etc.
  • Within each language subfolder, you will find a similar file structure as on the level above, but for the corresponding language.
Language Status
Dutch in progress
Farsi in progress
French in progress
German in progress
Greek untranslated
Hebrew untranslated
Italian in progress
Japanese untranslated
Spanish untranslated
Turkish in progress