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
This document is a how-to on creating a complete administrator/install language pack for Joomla! International Edition. A basic knowledge of PHP, HTML, XML and the joomla file tree may be needed for this. The first step is to download the latest version of Joomla International Edition and the default language template pack.

Background

Joomla! International Edition provides support for a multi-language administrator interface and also allows for creating your own install package in the language of your choice. The language functionality has been accomplished through a "variablization" of many of the core Joomla! files. Essentially whenever English text appeared in the Joomla! core files, it was replaced by a PHP constant variable and this constant was added to a language file. For most components/modules separate language files were used. However it is important to note that there is also a main admin language file that contains many common words. In order to reduce redundancy in translation, in most cases when common words appeared they were added to main admin language file. This will be beneficial to the language pack creators because it will save them the time having to retranslate many words and phrases. However in some cases the context of the word obligated us to create a separate variables for the same word.

UTF-8 issues

The base Joomla! International Edition package installs Joomla with a UTF-8 database and with the UTF-8 "hack" that is mentioned in the Joomla! forums. But because Joomla! 1.0.12 is not fully compatible with UTF-8, there may be some unforeseen problems in the install. It is important that the admin research these UTF-8 issues before using this package. In the installation language file (which will be discussed later) it is possible to change your database encoding to whatever you need, however it is important to note that you will need to undo the UTF-8 "hack" if you decide to change this setting to anything besides UTF-8. In addition, the language files you create need to be saved in UTF-8 format WITHOUT BOM option. If this is the case, make sure your text editor supports this.

File Types

There are two types of files that will need to be created/modified. These are PHP language files and XML files. The PHP language files are files that assign a word or a phrase to a PHP constant, which is then used in the interface. The XML files are module parameter files, when editing a module the administrator will often see parameters, new XML file will need to be created based on your language. In addition there are a few images that can be translated which are included in the language pack.