Translation for all programs
- Published on Thursday, 10 March 2011 18:33
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:
- <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) Ticketmaster 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
# KEY=Translated String
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).Example for Joomla 1.5:SOME TEXT=Some TextExample for Joomla 1.6:COM_RDAUTOS_SOME_TEXT="Some Text"The UPPERCASE letters/phrases needs to be untouched, just change the text behind the "="
Translating the hard way: Using a simple text editorThe 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.