Make texts in different content types translatable
Subject: Make H5P Interface Strings Compatible with WordPress Translation Tools like Loco Translate
Request:
Please make all system-generated strings (e.g. “Check”, “Retry”, “Show solution”, “Your score”) in H5P content types accessible to WordPress gettext functions (__(), _e(), etc.) or expose them via a .pot file.
This would allow popular translation plugins like Loco Translate, WPML, and Polylang to handle interface string translation without manually editing JSON files or using filters.
This small change would dramatically improve H5P’s integration into multilingual WordPress websites, especially for non-developers and schools relying on easy translation workflows.
Thank you!
otacke
Mon, 06/16/2025 - 22:14
Permalink
I beg to differ, this is not
I beg to differ, this is not a small change and currently not possible, sorry.
The translatable strings are part of the content types which use JavaScript, not PHP. Hence, they cannot rely on .pot files and `__()` etc.
In theory, H5P core could include a set of commonly used phrases such as the ones that you mentioned. Those could then be passed on to content types in a pre-defined way. But this way it's absolutely not feasible to do this for all content types' strings.
As an addendum: You are aware that every author can already change phrases manually (per content)? You will find a "Text overrides and translations" group at the bottom when editing H5P content.