x

Hoofdstukken

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Quick start guide
  3. LimeSurvey CE - Installatie
  4. Hoe maak je een goede enquête
  5. Aan de slag
  6. LimeSurvey configuratie
  7. Inleiding - Enquêtes
  8. Bekijk enquête-instellingen
  9. Bekijk enquête-menu
  10. Bekijk de enquêtestructuur
  11. Introductie - Vragen
  12. Introductie - Vraaggroepen
  13. Inleiding - Enquêtes - Management
  14. Enquête taakbalk opties
  15. Meertalige enquête
  16. Quick start guide - ExpressionScript
  17. Geavanceerde features
  18. Algemeen FAQ
  19. Probleemoplossing
  20. Tijdelijke oplossingen
  21. Licentie
  22. Versie change log
  23. Plugins - geavanceerd
 Actions

Aangepaste vertaling

From LimeSurvey Manual

Revision as of 15:12, 8 July 2024 by Han (talk | contribs) (Created page with "Aangepaste vertaling")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Inleiding

Since LimeSurvey 5.4.0 you can have your own translation for all strings in all included languages with direct access to your database.

This system can be used if an existing translation is not compatible with your business needs.

It should be reserved for specific cases, since text modifications in the heart of LimeSurvey will again require a modification of your database.

Furthermore, you can use this method for translating Survey Theme specific strings.

How database translations works

For database translations, LimeSurvey uses a method inspired by CDbMessageSource from the Yii framework.

  1. find the string in SourceMessage table lime_source_message->message, get the id : lime_source_message->id
  2. if exists, find the related translation in Message table lime_message->translation for current language lime_message->language with current id lime_message->id

LimeSurvey creates the array with translations from po file (see Translating LimeSurvey for information how to update this file), and afterwards merges it with all translations from the database.

Then the translations from the database are always returned if they exist.

Sample for “Submit” button in English and French

You want to show _Validate_ and not _Submit_ for the submit button in all of your surveys (with a specific theme). If you just update the theme and replace gT('Submit') by gT('Validate') : it always shows _Validate_ in all languages.

For all surveys with all themes

  1. Create the source message INSERT INTO lime_source_message (id, category, message) VALUES (NULL, NULL, 'Submit');
  2. Check the ID (if it's the 1st : ID is 1) and use it for next instruction
  3. Create the related translation : INSERT INTO lime_message (id, language, translation) VALUES ('1', 'en', 'Validate'), ('1', 'fr', 'Valider');

Using your own theme (recommended solution)

This method uses a solution with your own template, it updates the default string for all other languages as well.

  1. In Theme editor select the Navigation part
  2. Search for Template:GT("Submit") (in navigator.twig)
  3. Replace by Template:GT("Validate")
  4. Create the source message INSERT INTO lime_source_message (id, category, message) VALUES (NULL, NULL, 'Validate');
  5. Check the ID (if it's the 1st : ID is 1) and use it for next instruction
  6. Create the related translation : INSERT INTO lime_message (id, language, translation) VALUES ('1', 'fr', 'Valider');