PhpLangEditor

From ClarolineDoc

Table of contents

phpLangEditor

Enlarge


Installation

phpLangEditor is a Firefox (http://www.mozilla.com/en-US/firefox/) extension dedicated to edition of php applications language files. To be able to install it you will have to get and install Firefox (http://www.mozilla.com/en-US/firefox/).

To install phpLangEditor grab it, using Firefox, from the official site : phpLangEditor (http://phplangeditor.mozdev.org/). Restart Firefox to finalize installation.

Translate

Opening

Opening phpLangEditor
Enlarge
Opening phpLangEditor
phpLangEditor opened
Enlarge
phpLangEditor opened

Now that phpLangEditor is installed a 'phpLangEditor' link has been added in the 'Tools' menu of your Firefox. Click this link to open phpLangEditor.


Start working

Opening reference file
Enlarge
Opening reference file

To start working click on the Open Reference button, it will ask you to open the file to translate.

Several possibilities are offered :

  • Start a non existing Claroline translation : open the claroline/lang/english/complete.lang.php file as it is the base translation of Claroline and translate it. No need to 'Open translation' here.
  • Complete a existing Claroline translation : open the missing.lang.php file of the language you want to translate. This file is filed with English translations so you don't have to open a translation file.
  • Use Open translation if you have a work in progress to prefill the 'Translation text' text zone with the already translated strings.


Charset matters

Choosing translation charset
Enlarge
Choosing translation charset

Before opening a file you should set the correct charset in the two corresponding select box. It is very important to do that before translating. So for example, if your want to translate the French missing files, you can open the reference as UTF-8 because it initially contents only english strings, but before starting translation you should select the translation charset in the second select box. Charset of translation is the one that is used when opening the translation file but also the one used to save the file.

In Claroline, charset for each language is set in the corresponding locale_settings.php file, refer to this value if you don't know which charset to choose.

Translating

Translating
Enlarge
Translating

After you have translate a string click on the Next button to validate the string and to translate to next one. To go faster you can use CTRL+Return as a keyboard shortcut.

You can switch between View all and View untranslated to see what else needs to be translated.


Saving

When it's done click on 'Save translation' button to generate a language file from your translations.


See also