Translating a Joomla! extension is a really simple task that can be accomplished with a simple text editor, nevertheless there are several scripts that can make the life of a Joomla! translator easier. In this article I 'll try to introduce some of the alternatives I have found since I started to translate Joomla! extensions.
Introducing the translation files
At the Translator's section of the
Joomla! Documentation Wiki there are some documents that could help you understand the files better, but let me introduce the basics.
Joomla! translations are located in two directories:
[list]
[*]<Your Joomla Site>/languages
[/*:m][*]<Your Joomla Site>/administrator/languages[/*:m][/list:u]
And the naming convention is: xx-XX.component_name.ini where xx is your language ISO CODE and XX is your country code. Both codes are usually of two letters.
So for the Spanish (international sort) JEvents translation, you should name your translation file:
es-ES.com_jevents.ini
The content of the language files has this structure:
# Header
# with some
# useful information
# as the translation licence
# or the translator name
KEY=Translated String
So again for JEvents, we will have:
#
# JEvents MVC
# License: GPL v2.0 or later
# Translator:Carlos M. Cámara Mora
# Translator's URL:www.gnumla.com
Calendar=Calendario
As you can see, the ini files are really easy to create and to work with.
It is important to save the files in the UTF-8 codification, in order to avoid special characters problems.
[size=200]Translating the files[/size]
As I have written in the introduction, there are several ways of working with the language files in Joomla!. But all of them have in common that you need to have the string keys to translate. As the keys can be any word (but usually the are related with the strings they represent) Let's show them:
[size=150]Translating the hard way: Using a simple text editor[/size]
The ini files are text files, so you can edit them with your favourite text editor. Nevertheless you shouldn't use any big software as text processors. Some great and GPL text editors are Notepad++ (for windows), Gedit (Gnome), Mousepad (XFCE), Bluefish (any Linux), etc. In every one of these editors you can save your file as UTF-8.
[size=150]Using specific software[/size]
There is a great program for Windows that also works in Linux with Wine. It is called Initranslator. With this software you can accomplish the translation easily because not only it shows the key strings in a tabular mode, but you can also open related translations and if the key strings are the same, the software will use the translated string. This is extremely useful when dealing with key files reordered or with their new strings included among the old strings. With initranslator you can open the new key file and its corresponding old translated file and the software will assign automatically each translated string with its key string.
IniTranslator Page
[size=150]Joomla! comes to help[/size]
As we are working with Joomla! files, it would be great to use the CMS to accomplish the translations. It's possible thanks to the Translations Manager Extension. Some translators use this extension successfully, and it gives them a quick and easy way of making their translations. Nevertheless, I don't recommend it, because I lost some key strings trying to translate a long translation file. So I don't rely on it. But it really could be the fastest way of creating and maintaining a translation. If you love risk, this is a great opportunity to deal with some ;o).
Translations Manager Extension