View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
20294Bug reportsTranslationpublic2025-10-25 15:32
ReporterFreda Assigned Togabrieljenik  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Summary20294: Translation fails (Dari and Tigrinya) due to missing language code mappings
Description

No explicit error appears even when debug mode is enabled. The browser console shows a true response, but no translation result is produced. see screenshot.

After investigation (credit to Tim), it appears that the issue is caused by missing language code mappings in:

/assets/scripts/admin/translation.js

and possibly also in QuickTranslationController::translateGoogleApi

Adding a manual mapping for the language resolves the issue (tested in browser by manipulating translation.js).

Steps To Reproduce

Steps to reproduce

Create or open any survey with multiple languages.

Add Dari (prs) or Tigrinya (ti) as an additional language.

Open the “Quick Translation” tool.

Attempt to auto-translate from English to the additional language.

Expected result

The translation should complete successfully, similar to other supported languages.

Actual result

Translation fails see attached screenshot.
Debug mode does not reveal an error.

Proposed Fix:
Add proper mappings for prs (Dari) → fa-AF and ti (Tigrinya) → appropriate Google Translate language code both in:
assets/scripts/admin/translation.js
QuickTranslationController::translateGoogleApi

TagsNo tags attached.
Attached Files
Bug heat2
Complete LimeSurvey version number (& build).
I will donate to the project if issue is resolvedNo
Browserchrome
Database type & version..
Server OS (if known)
Webserver software & version (if known)
PHP Version.

Relationships

related to 20323 assignedgabrieljenik Google Translate integration fails for some languages due to mismatched language codes (hat, prs, mya, swh, fil) 

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2025-10-25 15:31

updater   ~83671

@gabrieljenik, @tibor.pacalat, we also tested some languages with Google translate recently, see 20323.

There may be some more languages missing:

  1. Hausa (ha)
  2. Somali (so)

For the previously mentioned language "Dari" the issue could also be related to different language codes used (see my bug report link above). Google treats this as a variation of Persian and thus uses code "fa" while Limesurvey uses "prs" as language code.

Issue History

Date Modified Username Field Change
2025-10-10 16:40 Freda New Issue
2025-10-10 16:40 Freda File Added: Screenshot 2025-09-29 at 14.41.26.png
2025-10-13 09:58 tibor.pacalat Assigned To => gabrieljenik
2025-10-13 09:58 tibor.pacalat Status new => assigned
2025-10-25 15:31 Mazi Note Added: 83671
2025-10-25 15:31 Mazi Bug heat 0 => 2
2025-10-25 15:32 Mazi Relationship added related to 20323