Skip to main content

Languge Files

Overview

Our Extensions uses native Joomla language procedures. 

Translate example - JomDirectory

We have created an installation package that can be translated and adapted to any language.

com_jomdirectory_en-GB.zip

Please notice that file version is 6.1. While you are reading there can be the newest version.

Here is a procedure to translate the extension and create a language pack:

Unpack the files

To translate extension into any language file jomdirectory_en_GB.zip needs to be downloaded (link above) and unpacked to some temporary directory. Structure of the folders will looks like this:

obraz.png

These are the folders containing translations for the extensions and modules. The last file is the installation file.

Changes files names to new language

If we would like to translate e.g. into German we would need change all the names from en_GB to de_DE accordingly:

Translate all phrases inside files

We need to translate all the phrases in the files, these are in double quotes e.g:

COM_JOMCOMDEV_HOME_CATEGORIES="Kategorien"

Edit installation file

After translation is done, edit jomdirectory_de_de_language_pack xml and change all names accordingly:

<?xml version="1.0" encoding="utf-8"?>
 <extension type="file" version="2.5" method="upgrade">
 <name>JomDirectory Sprachpaket Deutsch</name>
 <version>2.5.0</version>
 <creationDate></creationDate>
 <author>AUTHOR</author>
 <authorEmail>YOUR EMAIL</authorEmail>
 <authorUrl></authorUrl>
 <copyright>Copyright (C) 2011 Comdev. Alle Rechte vorbehalten.</copyright>
 <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
 <description>JomDirectory Sprachpaket Deutsch</description>
 <fileset>
 <!-- Admin jomdirectory component language folder -->
 <files folder="com_jomdirectory/admin" target="administrator/language/de-DE">
 <filename>index.html</filename>
 <filename>de-DE.com_jomdirectory.ini</filename>
 <filename>de-DE.com_jomdirectory.sys.ini</filename>
 </files>
 <!-- Admin jomcomdev component language folder -->
 <files folder="com_jomcomdev/admin" target="administrator/language/de-DE">
 <filename>index.html</filename>
 <filename>de-DE.com_jomcomdev.ini</filename>
 <filename>de-DE.com_jomcomdev.sys.ini</filename>
 </files>
 <!-- Site jomdirectory language folder -->
 <files folder="com_jomdirectory/site" target="components/com_jomdirectory/language/de-DE">
 <filename>index.html</filename>
 <filename>de-DE.com_jomdirectory.ini</filename>
 </files>
 <!-- Site jomcomdev language folder -->
 <files folder="com_jomcomdev/site" target="components/com_jomcomdev/language/de-DE">
 <filename>index.html</filename>
 <filename>de-DE.com_jomcomdev.ini</filename>
 </files>
 <!-- modules language files -->
 <files folder="mod_jomdirectory_items" target="language/de-DE">
 <filename>index.html</filename>
 <filename>de-DE.mod_jomdirectory_items.ini</filename>
 <filename>de-DE.mod_jomdirectory_items.sys.ini</filename>
 </files>
 <files folder="mod_jomdirectory_search" target="language/de-DE">
 <filename>index.html</filename>
 <filename>de-DE.mod_jomdirectory_search.ini</filename>
 </files>
 </fileset>
 </extension>

Please make sure to insert your email:

 <authorEmail>YOUR EMAIL</authorEmail>

for further updates. As seen above all en_GB has been changed to de_DE.

Zip package

The last step is to zip all files and create a new file: jomdirectory_de_DE.zip

Test package

Now go to your Joomla and install package, if everything goes right component will be translated, upload it on the Forum in Localizations

If any errors?

It is worth to turn on language debug under Joomla to check if any language errors occur and need to be corrected. These will be visible under the page flashing on red, also, lines will be provided in which error occurs.

The most common error is enclosed double quotes e.g: COM_JOMCOMDEV_HOME_CATEGORIES="Kategorien

Unicode UTF8 Compatibility

Language files have to be saved with the encoding UTF8 NO BOM.

Please see the Joomla documentation on the link below for more information on Joomla language files.

http://docs.joomla.org/Creating_a_language_definition_file

For technical information about this topic see:

2.6 Encoding Schemes

http://www.unicode.org/versions/Unicode5.0.0/ch02.pdf

and

http://stackoverflow.com/questions/2223882/whats-different-between-utf-8-and-utf-8-without-bom