Question Set Drag the Word, How to translate Confirm/Cancel buttons
Submitted by SimonD on Fri, 05/02/2025 - 11:46
Forums:
Hello,
I'm using a Drag the Words question in a Question Set H5P content.
My execrice is in French.
I've been able to modify/translate most of the text but I'm having trouble translating the Confirm and Cancel buttons in the confirmation popup when I start the exercise again.
How do I translate these buttons
Thanks
otacke
Fri, 05/02/2025 - 19:53
Permalink
These strings are not part of
These strings are not part of the content type, but part of H5P core (in theory). It's more efficient to have it there for all content types to use instead of putting the same strings into each and every content type over and over again. In practice, it's slightly more complicated: the H5P integrations need to provide the translation, so their respective (native) translation service can be used.
You did not say: What H5P integration (aka plugin) are you using?
SimonD
Fri, 05/02/2025 - 22:04
Permalink
Hello otacke,Many thanks for
Hello otacke,
Many thanks for your reply.
Well, I'm using h5p for WordPress: https://wordpress.org/plugins/h5p/
otacke
Sat, 05/03/2025 - 13:15
Permalink
This needs to be translated
This needs to be translated as part of the WordPress plugin then. There's a specific languages folder using "PO"-Files which are often translated using POEdit.
WordPress.org has its own internal translation system to "Translate Live". I am not 100% familiar with it, but if I understand correctly, translations that are generated there will take precedence and override or at least complement translations of plugins. So in theory, you could use that too add translations.
However, their "Translate Live" system can only offer strings for translation that it can detect. The strings that you are referring to are used with H5P's iframe (which the system can't render) and thus are undetectable. In consequence, they are missing in the translations on WordPress.org despite that page claiming 100% coverage for French and a couple of other languages.
I therefore think it is reasonable to also provide full translations with the plugin.
I just created a pull request for the German translations that suffered from exactly the same issue that you experienced.
As a note: I am not aware who's in charge of the plugins at H5P Group, so I do not know who should be reached out to - it's good to know about that shortcoming! And translators should be made aware of the issue as well.
SimonD
Mon, 05/05/2025 - 21:06
Permalink
Hello otacke,I usually use
Hello otacke,
I usually use Loco Translate (https://fr.wordpress.org/plugins/loco-translate/) to translate theme and plugin strings from the WordPress administration.
Before opening this forum topic, I checked whether I could translate the words 'Cancel' and 'Confirm' from the h5p plugin with Loco Translate.
Unfortunately without success. As you suggest, it seems that these strings do not exist in the translation files
otacke
Mon, 05/05/2025 - 21:21
Permalink
Then LocoTranslate is
Then LocoTranslate is probably on the WordPress "internal" translation files, not on what the H5P plugin provides.
Even if it worked for you, it's not really in the spirit of an open source project to complete translations locally only, so the original H5P files should be translated.