A guide to implement the JomHoliday component with a multilingual joomla site.


Table Of Contents

Overview

JomHoliday uses native Joomla language procedures. 

Translate JomHoliday

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

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

Please notice that file was uploaded on: 21.09.2019 While you are reading there can be a newest version.

Unpack the files

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

These are the folders containing translations for the extensions and modules. 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 jomholiday_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>JomHoliday 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>JomHoliday Sprachpaket Deutsch</description>
      <fileset>
          <!-- Admin JomHoliday component language folder -->
          <files folder="com_jomholiday/admin" target="administrator/language/de-DE">
              <filename>index.html</filename>
              <filename>de-DE.com_jomholiday.ini</filename>
              <filename>de-DE.com_jomholiday.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 JomHoliday language folder -->
          <files folder="com_jomholiday/site" target="components/com_jomholiday/language/de-DE">
              <filename>index.html</filename>
              <filename>de-DE.com_jomholiday.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_jomholiday_items" target="language/de-DE">
              <filename>index.html</filename>
              <filename>de-DE.mod_jomholiday_items.ini</filename>
              <filename>de-DE.mod_jomholiday_items.sys.ini</filename>
          </files>
          <files folder="mod_jomholiday_search" target="language/de-DE">
              <filename>index.html</filename>
              <filename>de-DE.mod_jomholiday_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

Last step is to zip all files and create a new file: jomholiday_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 erros?

It is worth to turn on language debug under Joomla to check if any language errors occurs 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 unclosed  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