View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
20674Bug reportsSurvey takingpublic2026-09-21 21:30
Reporterginosupport Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Summary20674: Invalid html lang attribute set for Dutch informal leading to weird auto-translate behavior
Description

Using language Dutch informal sets an invalid html lang attribute, which results in incorrect auto-translation.

Steps To Reproduce

Steps to reproduce

Create any survey and set the default language to Dutch informal

In my case there was a question about the gender of your child ('Wat is het geslacht van je kind'). The user had the browser setup to auto-translate English to Dutch. I've received a screenshot where the word 'kind' (= child) was interpreted as an English word meaning 'type/sort', so the question translated to the equivalent of 'What is the gender of your sort' (which makes no sense).

Expected result

The question is shown as-is.

Actual result

The question was partially translated.

I believe this was caused by an invalid lang attribute value, it was rendered as <html lang="nl-informal">, which is not a valid value according to https://www.w3schools.com/tags/ref_language_codes.asp. It should just use "nl", for regular Dutch and for Dutch informal.
I suspect there might be other languages that are affected by this issue.

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)6.17.19+260832
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgres 17
Server OS (if known)
Webserver software & version (if known)
PHP Version8.4.x

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2026-09-19 22:43

administrator   ~85852

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=40371

LimeBot

LimeBot

2026-09-21 21:30

administrator   ~85911

Fixed in Release 7.2.0+260921

Related Changesets

LimeSurvey: master 7b1ed5cb

2026-09-18 11:20

c_schmitz

Committer: GitHub


Details Diff
Fixed issue 20674: Invalid html lang attribute set for some translation languages (05281) Affected Issues
20674
mod - application/config/internal.php Diff File
mod - application/controllers/admin/PrintableSurvey.php Diff File
mod - application/core/LSETwigViewRenderer.php Diff File
mod - application/helpers/surveytranslator_helper.php Diff File
mod - application/views/admin/super/header.php Diff File
mod - application/views/layouts/header.php Diff File
mod - themes/survey/fruity_twentythree/views/layout_errors.twig Diff File
mod - themes/survey/fruity_twentythree/views/layout_global.twig Diff File
mod - themes/survey/fruity_twentythree/views/layout_maintenance.twig Diff File
mod - themes/survey/fruity_twentythree/views/layout_print.twig Diff File
mod - themes/survey/fruity_twentythree/views/layout_survey_list.twig Diff File
mod - themes/survey/vanilla/views/layout_errors.twig Diff File
mod - themes/survey/vanilla/views/layout_global.twig Diff File
mod - themes/survey/vanilla/views/layout_maintenance.twig Diff File
mod - themes/survey/vanilla/views/layout_print.twig Diff File
mod - themes/survey/vanilla/views/layout_survey_list.twig Diff File

Issue History

Date Modified Username Field Change
2026-09-08 14:11 ginosupport New Issue
2026-09-08 14:11 ginosupport File Added: incorrectly-translated-question.png
2026-09-08 16:12 eusweisker Assigned To => eusweisker
2026-09-08 16:12 eusweisker Status new => assigned
2026-09-08 16:38 c_schmitz Status assigned => ready for code review
2026-09-18 11:21 eusweisker Status ready for code review => resolved
2026-09-18 11:21 eusweisker Resolution open => fixed
2026-09-19 22:43 c_schmitz Changeset attached => LimeSurvey master 7b1ed5cb
2026-09-19 22:43 c_schmitz Note Added: 85852
2026-09-19 22:43 c_schmitz Assigned To eusweisker => c_schmitz
2026-09-19 22:43 c_schmitz Bug heat 0 => 2
2026-09-21 21:30 LimeBot Note Added: 85911
2026-09-21 21:30 LimeBot Status resolved => closed
2026-09-21 21:30 LimeBot Bug heat 2 => 4