View Issue Details

This issue affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
20882Feature requestsTheme editorpublic2026-11-20 19:24
ReporterDenisChenu Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary20882: Survey themes: no way to provide their own translations (public side and theme options)
Description

A survey theme can only use the LimeSurvey core translations:

  • in the Twig views (public side, shown to respondents): gT() and ngT() only look in the core translation files;
  • in the theme options (admin side): title, and the texts of <dropdownoptions> (TemplateManifest::translateDropdownOptions()), are translated with the core gT() too.
  • in DB manually

A text that is not in the core translation files is always shown in the language it is written in. A theme cannot add a new text for respondents, or a label for one of its own options, that follows the survey language or the admin language.

Plugins already have this: each plugin can provide its own translation files in locale/ (PluginBase::gT() uses a message source per plugin, <PluginName>Messages).

Additional Information

Use cases

  • Public side: a theme that adds a text for respondents (an accessibility help text, a label for a new control, a text for a skip link…) has to choose one language for all surveys.
  • Admin side: the labels of the theme's own options, and their help texts (see the bug report about help texts for theme options), cannot be translated.
  • Workarounds today: one copy of the view per language. These are not usable for a theme shared between many surveys and installations.

Expected result

The same translation files as plugins (PluginBase::setLocaleComponent(): locale/<lang>/<lang>.mo), in the theme directory:

themes/survey/mytheme/locale/messages.pot
themes/survey/mytheme/locale/fr/fr.po
themes/survey/mytheme/locale/fr/fr.mo
themes/survey/mytheme/locale/de/de.po
themes/survey/mytheme/locale/de/de.mo
  • A Twig function for the theme translations, for example {{ tT("Text") }}, or gT() looking first in the theme files.
  • The language used: the survey language on the public side, the admin user language for the theme options.
  • Fallback order: the theme, then its parent themes (extends in config.xml), then the LimeSurvey core translations.
  • The same files used for the title, optionlabels, dropdown options and help texts of the theme options.

Actual result

Only the texts already in the LimeSurvey core translation files are translated. Any other text is shown untranslated, in every language.

TagsNo tags attached.
Bug heat0
Git branch / Pull Request URLN/A

Users monitoring this issue

There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-11-20 19:24 DenisChenu New Issue