Actions

Translating LimeSurvey

From LimeSurvey Manual

Revision as of 19:19, 1 June 2011 by C schmitz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Translating LimeSurvey

Wouldn't it be great to have LimeSurvey completely translated to your mother-language? The LimeSurvey team is always on the look-out for new translations and for people who help to update the existing ones. Please read this instructions and don't hesitate to ask your doubts to translations@limesurvey.org.

How to translate - Step-by-Step instructions

Updating an existing language file

  1. Download and install poEDIT
  2. Go to this translation status page and download the latest .po file for your language. Do not use the one in your installation since it may not contain all untranslated strings.
  3. Open the .po file with poEdit.
  4. Now edit the file. Every time you save the file not only the po.file will be saved , but also the .mo file will be saved. The .mo file is the compiled file that LimeSurvey is using and reading from.
  5. Translate everything you need to translate. The yellowish marked items are 'unclear' translations and you should check/correct these first. Remember that it is better to have no translation than a wrong one!
  6. Save. Put the .mo file into the live directory of your LimeSurvey installation. You will find the file for your particular language in the /locale/your_language_code/LC_MESSAGES/ folder.
  7. Send the updated .po-File to translations@limesurvey.org.

Creating a language file for a new language

  1. First of all get access to the development version of LimeSurvey. You can find detailed instructions how to get your hands on it on this page: Accessing the source code
  2. Download and install poEDIT
  3. Now you have to find out the language-code for your language - you can search for your language-code in the IANA Language Subtag Registry.
  4. Go to the /locale directory and create a directory named after your language code.
  5. Inside that directory create a directory named LC_MESSAGES.
  6. Now create a language file with poEdit. Save the (yet) empty file to that dir (in the /locale/your_language_code/LC_MESSAGES/ folder). The file has to be be named according to your language-code. (look into the other directory for examples)
  7. In poEdit do the following:
    1. Open menu Catalog/Settings, enter the Paths-Tab
    2. Delete the existing path and add a new one pointing to the downloaded LimeSurvey sources
    3. Click on the Keywords tab, click on new item
    4. Add the keywords: 'gT' and 'ngT' (without quotes, of course)
    5. Press 'OK' to close the settings.
    6. Open the menu entry Catalog/Update from Sources
    7. If you did everything right it should now find all untranslated strings and add it to the .po file
  8. Translate everything you need to translate. The yellowish marked items are 'unclear' translations and you should check/correct these first. Remember that is better to have no translation than a wrong one!
  9. To make LimeSurvey know about your language you must add it to the file classes/core/surveytranslator.php. Open that file with a text editor and add your language in the same way the other languages in that file are defined.
  10. Save. Send the new .po-File and the updated surveytranslator.php file to carsten.schmitz@limesurvey.org . If you want your name to be linked from/shown on the team-page please write so in the e-mail!

Updating the existing translation with direct subversion access

  1. First of all get access to the latest stable source version of LimeSurvey in Subversion. You can find detailed instructions how to get your hands on it on this page: Accessing the source code
  2. Download and install poEDIT
  3. Open the existing .po language file with poEdit. You can find it in the /locale/the_language_code/LC_MESSAGES/ folder.
    1. Open menu Catalog/Settings, enter the Paths-Tab
    2. Delete the existing path and add a new one pointing to root directory the downloaded LimeSurvey1 sources
    3. Click on the Keywords tab, click on new item
    4. Add the keywords: 'gT' and 'ngT' (without quotes, of course)
    5. Press 'OK' to close the settings.
    6. Open the menu entry Catalog/Update from Sources
    7. If you did everything right it should now find all untranslated strings and add it to the .po file
  4. Translate everything you need to translate. The yellowish marked items are 'unclear' translations and you should check/correct these first. Remember that is better to have no translation than a wrong one!
  5. Save. TortoiseSVN (or whatever client you chose) should show now that the .po and the .mo file have been modified.
  6. Mark the changed files and choose Commit (wit TortoiseSVN use the right-click popup-menu) to commit your files to the repository. To be able to commit files you will need to register a free account on http://sf.net and tell Carsten Schmitz ( carsten.schmitz@limesurvey.org ) your sf.net username so he can give according write access to you.