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:
- <Your Joomla Site>/languages
- <Your Joomla Site>/administrator/languages
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:
The content of the language files has this structure:
# with some
# useful information
# as the translation licence
# or the translator name
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
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.
Translating the files
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:
Translating the hard way: Using a simple text editor
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.
Using specific software
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.
Joomla! comes to help
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