Translating LimeSurvey: Difference between revisions
From LimeSurvey Manual
No edit summary |
No edit summary |
||
Line 29: | Line 29: | ||
##Click on the ''Keywords'' tab, click on new item | ##Click on the ''Keywords'' tab, click on new item | ||
##Add the keywords: 'gT' and 'ngT:1,2' (without quotes, of course) | ##Add the keywords: 'gT' and 'ngT:1,2' (without quotes, of course) | ||
##On the project info tab you will find "Plural Forms" at the bottom. Just copy & paste the following into this field: 'nplurals=2; plural=n != 1;' (without quotes, again) | |||
##Press 'OK' to close the settings. | ##Press 'OK' to close the settings. | ||
##Open the menu entry ''Catalog/Update from Sources'' | ##Open the menu entry ''Catalog/Update from Sources'' |
Revision as of 15:36, 20 June 2011
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
- Download and install poEDIT
- 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.
- Open the .po file with poEdit.
- 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.
- 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!
- 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.
- Send the updated .po-File to translations@limesurvey.org.
Creating a language file for a new language
- 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
- Download and install poEDIT
- 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.
- Go to the /locale directory and create a directory named after your language code.
- Inside that directory create a directory named LC_MESSAGES.
- 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)
- In poEdit do the following:
- Open menu Catalog/Settings, enter the Paths-Tab
- Delete the existing path and add a new one pointing to the downloaded LimeSurvey sources
- Click on the Keywords tab, click on new item
- Add the keywords: 'gT' and 'ngT:1,2' (without quotes, of course)
- On the project info tab you will find "Plural Forms" at the bottom. Just copy & paste the following into this field: 'nplurals=2; plural=n != 1;' (without quotes, again)
- Press 'OK' to close the settings.
- Open the menu entry Catalog/Update from Sources
- If you did everything right it should now find all untranslated strings and add it to the .po file
- 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!
- 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.
- 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
- 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
- Download and install poEDIT
- Open the existing .po language file with poEdit. You can find it in the /locale/the_language_code/LC_MESSAGES/ folder.
- Open menu Catalog/Settings, enter the Paths-Tab
- Delete the existing path and add a new one pointing to root directory the downloaded LimeSurvey1 sources
- Click on the Keywords tab, click on new item
- Add the keywords: 'gT' and 'ngT' (without quotes, of course)
- Press 'OK' to close the settings.
- Open the menu entry Catalog/Update from Sources
- If you did everything right it should now find all untranslated strings and add it to the .po file
- 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!
- Save. TortoiseSVN (or whatever client you chose) should show now that the .po and the .mo file have been modified.
- 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.