Topic: General strategies for creating a localization of the Kete UI for 1.3

Topic type:

A guide on what to keep in mind when localizing Kete's User Interface text.

Kete 1.3 will include the ability to localize (or alter to suit a site) the text that makes up the user interface. We're hoping that the 1.3 will also include some stock translations in place. This is an introduction to how to do translations in Kete.

There are two main ways of doing translations for Kete's interface:
  1. use the built in web interface under /translate on development version of your site and then copy generated files to your production site as found in Using translate plugin to translate your Kete installation
  2. or export one language's localization to XML, import it to a spreadsheet program and create new localized text, export to XML, and finally reimport as described in Exporting translations to Excel compatible format
Both options require some technical expertise to prepare. Have your Kete tech person prepare these for you. The rest of this document will focus on what a translator will need to know to get the translations done.

Kete Translation Process Concepts

Each piece of text being translated in Kete has two elements per language:

  • a key that is composed of parts that identify what is being translated, e.g. account.login.button key corresponds to the account login page's text in the button
  • a value that is the text will be presented to the user for the language, it may also include (or be entirely made up of) two other special kinds of placeholders that are demarcated by the {{}} syntax
    • variables, e.g {{user_name}}, means that the Kete program will substitute in the actual user's name in this place in the translation when it is eventually shown to the user on the web page
    • the value of another translated key, e.g. {{t.base.basket}}. The t. (short for translation) tells us to reuse an existing translation key's value, the key matches what follows the "t." (except for modifying methods, see below). This is for reuse of other translation elements for faster translation and consistency of the user interface.

The special base text

Kete has a core set of words and phrases that are used throughout its interface, such as item and basket. They mostly correspond to common nouns in Kete and the actions a user can take on them.

Their keys, rather than being made up with pieces that describe where they are found on the site, are simply prefaced with "base".  They are then reused throughout other translated text with the {{}} syntax.

It is best to start by translating these base text first. You might need to come back to them as you become familiar with their use. That's fine, too.

Modifications of the value of another translated key

The Kete translation functionality also allows you to reuse another key's value, but modify it to suit the context, e.g. "All {{t.base.basket.pluralize}}" or "{{t.base.item.capitalize}} details".  These modifying methods are capitalize, downcase, upcase, pluralize, and singularize. You can also "chain" them, for example {{t.base.item.capitalize.pluralize}}.

Obviously for some languages certain modifications won't be relevant and can be ignored. We wouldn't bother removing them if they have no effect though. If you find that certain modifications don't work in your language, please let us know and we'll add support for that language. That is better than manually changing the text.

More notes on variables and using the value of another translated key, i.e. the {{}} syntax

If this seems at all confusing, don't worry about it. In most cases you won't need to touch what is between {{}}. For some languages you might need to move then entire {{}} element for better placement in the text, that is perfectly fine.

In some cases, you may need to completely get rid of the {{}} dynamic text and replace it with exactly what you want. You should consider if changing the source key's values makes more sense, otherwise feel free to replace it with your specific text.

Did I miss anything?

If you have further questions or you discover something helpful that you want to share with other translators, please add to discussion or edit this guide directly.

Now, Using translate plugin to translate your Kete installation will give you a guide to how to use the translate interface for localization or you can use your Excel compatible translation workflow if that suits.

Happy translating!

Discuss This Topic

There are 0 comments in this discussion.

join this discussion

Creative Commons Attribution-Share Alike 3.0 New Zealand License
General strategies for creating a localization of the Kete UI for 1.3 by Walter McGinnis is licensed under a Creative Commons Attribution-Share Alike 3.0 New Zealand License