SiDocRe - How to translate

Release 0.8.2

Step 1: create language directories and files

If directories for the new language do not already exist, you may create them using those of language en_US as template.

If, instead, they exist, you may skip step 1 and 2.

In SiDocRe's Web server public directory, copy file ./locale/en_US.dat to ./locale/xxxx.dat, where xxxx identifies the new language.
Also copy directory ./locale/en_US to ./locale/xxxx, where xxxx identifies the new language.

Example: cd /var/www/sidocre/locale; cp en_US.dat it_IT.dat; cp -R en_US it_IT

In SiDocRe's private directory, copy directory ./templates/help/en_US to ./templates/help/xxxx, where xxxx identifies the new language.

Example: cd /var/sdrdata/templates/help; cp -R en_US it_IT

In SiDocRe's public image directory, put a flag image for the new language.

Example: /var/www/sidocre/image/it-flag.gif

Index

Step 2: basic configuration

Using a text editor, edit ./locale/xxxx.dat file in SiDocRe's public directory, xxxx identifies the new language.

Using | as field separator char, change language code, language name, flag file name and language charset.

Example: it_IT|Italiano|it-flag.gif|iso-8859-1

Index

Step 3: translate file

Using a text editor or other tool as KBabel (see GNU gettext documentation), translate ./locale/xxxx/LC_MESSAGES/sidocre.po file in SiDocRe's public directory, xxxx identifies the language.

Example: translate ./locale/it_IT/LC_MESSAGES/sidocre.po.

When finished, create ./locale/xxxx/LC_MESSAGES/sidocre.mo file in SiDocRe's public directory (see GNU gettext documentation), xxxx identifies the language.

Example: cd ./locale/it_IT/LC_MESSAGES; msgfmt sidocre.po --output-file=sidocre.mo

Show should also translate ./templates/help/xxxx/*.tpl files in SiDocRe's private directory, xxxx identifies the language.
These files store help text shown at bottom of each page.

Index

Step 4: check languages

Open setup.php page using a Web browser. Run the following script: setup.php.

Example: open http://localhost/sidocre/setup.php.

Using setup.php page in the Installed languages section click on Check.

Look at new language status, it should be OK.

Index

Step 5: send copy to maintainer

Zip all files of the new language and email to:

Pierluigi Pretara (pretaz@users.sourceforge.net).

From SiDocRe's Web server public directory, zip ./image/yyyy, ./locale/xxxx and ./locale/xxxx.dat, xxxx identifies the language and yyyy the flag image.

Example: cd /var/www/sidocre; zip sidocre.0.8.2.pub.lang.it_IT.zip ./image/it-flag.gif ./locale/it_IT/* ./locale/it_IT/LC_MESSAGES/* ./locale/it_IT.dat

From SiDocRe's private directory, zip ./templates/help/xxxx, xxxx identifies the language.

Example: cd /var/sdrdata; zip sidocre.0.8.2.pri.lang.it_IT.zip ./template/help/it_IT/*

Example: send mantainer both sidocre.0.8.2.pub.lang.it_IT.zip and sidocre.0.8.2.pri.lang.it_IT.zip.

Index