Chapter 12. Plugin translations

Table of Contents

General considerations
i18n in RKWard's xml files
i18n in RKWard's js files and sections
i18n and quotes
i18n and backwards compatibility
Translation maintainance
Writing plugin translations

So far we have used a few concepts regarding translations or "i18n" (short for "internationalization", which has 18 characters between i and n) in passing. In this chapter we give a more in-depth account of what i18n functionally for RKWard plugins. For the most part you will not need all of this in your plugins. However, it may be a good idea to read over this chapter in full, as understanding these concepts should help you creating plugins that are fully translatable, and that allow for a high quality of translations.

General considerations

One important point to understand about software translations, in contrast to translations of other text materials, is that translators will often have a rather hard time getting a complete picture of what they are translating. Software translations are necessarily based on rather short fragments of text: Every label you give to an <option> in a <radio>, every string that you mark for translation in an i18n()-function call, will form a separate "translation unit". In essence, each such fragment will be presented to the translator in isolation. Well, not complete isolation, as we do try to provide translator with as much meaningful context as can be extracted, automatically. But at some points translators will need additional context to make sense of a string, especially where strings are short.