H5P Editor fails to use chosen language

Created on 23 September 2025, 9 days ago

Problem/Motivation

The H5P editor fails to use your chosen language and defaults to English.

Steps to reproduce

  • Enable Locale module
  • Navigate to /admin/config/regional/language and add French as another language
  • Navigate to /admin/structure/block and add the Language Switcher block to the header or footer
  • Use the language switcher to set your language to French
  • Add / edit an H5P item
  • The H5P Editor labels and descriptions are in English, even though you set your language preference to French.

Proposed resolution

The changes in πŸ“Œ Remove vendor directory and composer.lock from project repository Active resulted in the $chosenLanguage value in getTranslationFilePath() being root relative instead of relative. As a result, the file_exists() check doesn't find the file. A simple fix is to prepend the root relative path with the DRUPAL_ROOT value so file_exists() can find the file.

Remaining tasks

The fix above.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States illeace

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024