Translation

From OrangeHRM

Revision as of 00:40, 6 July 2009 by Jhyx (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

The steps of translating OrangeHRM into German language are described below. You can translate OrangeHRM into any other language, following the steps below.

We would be very grateful if you can send the translation back as it would be helpful to all OrangeHRM users.

You can take a copy of default language pack located in 'language' directory under directory 'default' as the starting point for the translation.

Have only the language files lang_default_full.php and lang_default_benefits.php.

Remove the files lang_default_repview.php, lang_default_view.php and lang_default_empview.php from the new directory. These three files do not have language constants and used for other purposes.

First of all it would be useful for translators to know how the language files work in OrangeHRM. It works like below.

All the new language constants are added to the default file language/default/lang_default_full.php by OrangeHRM team.
(may be added to en file language/en/lang_en_full.php also).
It is recommended for translators to start with this default file.
They have to translate each language constant as described below.
There may be module specific language files in the language directory. For example by the time of writing(versions 
starting from 2.3) there is another file lang_default_benefits.php in the lang/default/ directory for the 
Benefits module related language constants.
In such cases you should translate both the files or even you can just leave the benefits file without translating 
if you are not interested in the Benefits module.
But the file must exist in the directory. For example for German language, after the translation there must be two 
files lang_de_full.php & lang_de_benefits.php under the directory lang/de/.
If the benefits file is missing in the directory you would get an error saying "File missing or could not be 
found".

When you go into directory lang/default/ with file lang_defalut_full.php in it. Take a copy of the directory and rename it to "de" which is the language code given by browsers for German language. Now open one of these files (use any text editor. Notepad++ would be a good choice for you.), you will find a set of variable names starting with '$' signs being assigned phrases in English within quotes. Translation of this language pack would mean translating these phrases within quotes.

example: before translation:

$heading = 'Corporate Titles : Job Information';
$code = '#PIM Code';

after translation should read as:

$heading = 'Korporative Titel: Job-Informationen';
$code = '#PIM Code';

Note: that words preceding with '#' should be left unchanged in English. Do not translate the variable names(starting with $)


Save your translated file using UTF-8 encoding.

File names: Before renaming: lang_default_full.php After renaming: lang_de_full.php Note: no translations required here, just the change from default -> de

This is all you have to do get the captions in German. (The language pack is selected from browser language). ex: If you have set English as your language in the browser, you will still see all the captions in English.To get caption in German you will have to select German as your browser language. (if your browser supports language priorities, then German should be having the highest priority)

The following FAQ page would also be useful for one to know how to set the language settings in browsers.

http://www.orangehrm.com/wiki/index.php/24)_How_to_create_a_language_file_for_OrangeHRM

You can find more FAQs in the following page.

http://www.orangehrm.com/wiki/index.php/Orange_FAQ

If you have issues translating or think this wiki page lacks information please send your questions to support@orangehrm.com.


Happy translating!



Translations Spanish

Translations Spanish-Venezuela