How H5P detects the language / is it possible to force one?
Submitted by tiagojacobs on Tue, 07/20/2021 - 18:05
Forums:
Hello.
I'm using H5P embeded in my website ( with help of https://github.com/tunapanda/h5p-standalone ).
It's working very well, however, I could not understand how to tell H5P the desired language, let's say that I want to force the content type to use the same language as defined in website.
So the questions are:
- How H5P detects the language?
- Is it possible to force a specific language?
Thank you in advance,
Tiago
Summary:
Allow to specify language used by H5P
tiagojacobs
Tue, 07/20/2021 - 18:21
Permalink
Notes
Here it seems that language can be passed to iframe tag...
https://github.com/h5p/h5p-php-library/blob/4599291d7ce0cfb90edd188b181416f31514748e/js/h5p.js#L385
Going to try adding same thing here:
https://github.com/tunapanda/h5p-standalone/blob/1de6f6f181adacc02ee7f4a0331ab1510d7113c7/vendor/h5p/js/h5p-embed.js#L41
If anyone has an advice, I would be glad to hear.
tiagojacobs
Fri, 10/01/2021 - 18:59
Permalink
Got it
The right way to force a translation is by adding the entries in the contents.json file.