Language Pack Creation PDF Print E-mail
Written by Adrian Mummey   
Monday, 23 April 2007
Article Index
Language Pack Creation
PHP Files
Administrator Language Files
Installation Files

PHP Files

There are a couple things to note in the PHP files that may cause issue. Here is why a little PHP knowledge may help. Often times you will come across a statement such as: 

define('_ADM_SELECT_AN_ITEM_TO_ACTION', 'Select an item to %s');

 This code snippet will be used in a PHP sprintf statement. In this case the '%s' acts as a placeholder for a variable string that will be used. Thus when translating, the %s should be left alone or moved to where it will make the sentence grammatically correct if possible.

In addition, there is often HTML code embedded in the constant:

define('_ADM_PLEASE_CHECK_JOOMLA_SERVER', 
'Please check <a href="http://www.joomla.org/security10" target="_blank"
 style="color: blue; text-decoration: underline">
the Official Joomla! Server Security post</a> for more information.');

This is a link with some styling involved, in this case the HTML should be preserved and only the words changed

XML Files

In most cases the creation/modification of XML is quite simple. In these files, only the parameter label and description should be changed. Here is an example:

<param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description=
"A suffix to be applied to the css class of the module (table.moduletable),
 this allows individual module styling" />

In this case label="Module Class Suffix" , the words Module Class Suffix should be translated in addition to the description A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling

Sometimes there are other cases when the parameter contains a list of options, in this case the words inside the tags should be translated.

<option value="0">No</option>

In this case the word "No" should be translated.

Other files

Joomla! International Edition focused mainly on the administrative interface's core files. However plugins like tinyMCE editors and others are created by third parties and may have their own language packs associated with them. In these cases you should check the website of the corresponding component/module/mambot to see if they already have language packs. Often times when using 3rd party components you will need to change the language files to UTF-8 so that you don't get weird characters and artifacts.