Internationalisation

Overview
TODO: overview of labels within the system

Prerequisites
The user doing the import/export must have the RolePermission "Administer Label IO", "Administer Label Usage" and "Labels" (TODO: check this).

The script zymonic_lang_importer.pl must be in /usr/local/bin and executable by the apache processuser. This should be done automatically by the Zymonic_Toolkit_Installer

Export the labels
A label file would generally be delivered to a client as requested, for them to translate.

To generate a label file, login to the system and got to 'Admin Area Page', search for 'Label' in the menu and open the 'Label import and export' process. The Used By search field can be used to limit the labels being generated to just a specific process if required, but this is optional. Click 'Generate HTML for download' – when the block reloads there will be a link from which to download the file. If a specific process was used the the following line needs adding to the downloaded file: Please correct any errors and then try again.

Translate
The html file contains a body element which is filled with 'p' (paragraph) elements. Each of the paragraph elements has an 'id' this is the 'key' which will be used on the reimport therefore the form of the imported file should be a body element which is filled with 'p' tags which contain the translations (with the id maintained), i.e., the following: Customer Name should become: Nom du client

It is very important that the 'html → body → p*' structure of the document is maintained, that the ids are maintained as attributes on the 'p' elements, that the 'p' elements contain just the translation and that the document has correctly closed tags throughout. We have designed the file to be compatible with the Google Translator toolkit and it can be used as follows
 * 1) Navigate to the translator toolkit (you will need a google account).
 * 2) Select Upload.
 * 3) Go through each phrase and ensure it is correctly translated – note that anything in double square brackets will be substituted when each page request is generated; these must be maintained unchanged, including the case.
 * 4) From the 'share' menu select download to download the completed file.

Import
Important: The file name cannot contain spaces or special characters.

The final step is to import the file; in the 'Admin Area Page', in the menu search for 'Label' and open 'Label Import'. Fill in the language code, subset and select the file, then click import labels. The language code can be chosen freely, as can the subset. The import process deletes any records that match the 'digest' (id), language code and subset before importing each label.

Custom XSL per Language/Subset
Additionally the system will look in [html directory]/[language code]-[subset]/ for the 'default' XSL file

Viewing translated labels
simply update your session record in the DB to set zz_sessions.lang_code and zz_sessions.subset to match the values used on Import.