Menu

i18n

Dirk van der Walt
Attachments
js_phrases_afrikaans.png (89198 bytes)
translate_aus.png (17730 bytes)

Introduction

By now the Internet have reached most parts of the earth. It is important that the application one creates take this into account. Unless you write a piece of software with a very specific audience in mind, it is good practice to make it easy for people speaking other languages to translate your software to their native tongue.

RADIUSdesk cares much for your local language. For this it has a dedicated applet called Translation Manger. The goal of this applet is to lower the entry barrier for potential translation contributors.

This page is focused on introducing the Translation Manager to a user.


Launching Translation Manager

  • In order to launch the Translation Manager applet; you have to be logged in as root.
  • You must also remember that you can potentially be left with a broken (untranslated) system, so make sure before committing an action.
  • The Translation Manager can be launched from the start menu and is part of the available items in the root user's menu.

The interface

Due to the architecture of RADIUSdesk each translated phrase is translated in one of two possible places.

  • A Database table that creates a look-up object for JavaScript. This is used by Ext JS.
  • A Gettext .po file. This is used by CakePHP.

The Translation Manager applet is divided along the same lines with the two tabs it contains:

  • JavaScript Phrases: This tab is used to manage initial creation of a localised translation as well as the maintenance of the JavaScript phrases stored in the database and used by Ext JS.
  • PHP Phrases: This tab is used to manage the phrases stored in the .po file which in turn is used by CakePHP

Select to list

  • When you initially launch the applet, both grids will not show any items it them.
  • In order to list the phrases for a particular existing language; you have to select it from the Selection toolbar item.
  • This will result in the listed phrases with their translations and comments being displayed in the grid.
  • The following is a screenshot of the Translation Manager applet showing the Afikaans language phrases. Afrikaans is a language spoken in South Africa.

afr

  • You can go ahead to change some of those phrases, and see how it gives feedback as it does Ajax calls to the back-end to do a live update.

Create

If your language is not present, fear not since this section will show you step-by-step how to add your language.

For this exercise I'm going to imagine I'm from Australia and would really like to localise some of these UK English which is way to prim and proper.

Grab your country flag

You start off by getting an 32x32 px icon of your country's flag. The following URL's are handy to try:
http://findicons.com

Add the country and language

Once you have the flag icon of Australia, you can select Add -> Language of country and step through the wizard to create a Country and Language combination.


Important

After you went through the wizard there are two very important phrases that yhe have to translate in a special way:

  • spclCountry: This is the value of your country name in the language you just added.
  • spclLanguage: This is the value of name of the language you just added in the particular language

The reason for this is that no matter what language a person will select; your language will still be recognisable by you. This avoids the classic problem where having the interface completely in a foreign language.


The result

  • After we've Australianised some of the UK English (from which we copied the phrases) we can see it in action, Mate ;-)
  • Simply log out, and select Australia English from the available languages.

aus


Related

ConceptWiki: Home