Repository navigation
v0.6.2
H5P's own buttons and dialogs in the page's language
@missing-elements/h5p-runtime 0.1.2 and @missing-elements/h5p-offline-player 0.6.2.
H5P's own strings, such as the Fullscreen button, "Rights of use" with the licence names in it, and
the "this content has changed" dialog, were always in English. They now follow the element's
language, which it inherits from the page like any element:
<html lang="de">
...
<h5p-player src="course.h5p"></h5p-player>Or on the element itself: <h5p-player lang="pt-BR" src="course.h5p">.
The translations come from Moodle's language packs, where Moodle's translators keep the same strings
for Moodle's own H5P support: 56 languages, under GPL-3.0-or-later. de-AT gets German, nb
Norwegian and zh-Hant Traditional Chinese. A string a language lacks stays in English, and so does
every string in a language with no translation. The content's own text comes from the package and
does not change. The translations are refreshed from Moodle every week, and changes come out as
runtime releases.
The runtime carries them in one file, l10n.js, about 50 kB compressed. The frame loads it once,
only when the page is not in English, and the browser caches it. With a bundler, the runtime's
runtime export names it as l10nJs, and the element takes it with the other files.
The frame also tells screen readers which language the content is in: the defaultLanguage in
the package's h5p.json, as H5P itself declares it, or the page's language for a package that
names none. Until now every frame said it was English, so German content was read with an English
voice.
Each package works with the previous version of the other, in English: player 0.6.1 never asks
for translations, and with runtime 0.1.1 player 0.6.2 finds no l10n.js.
On a CDN, update both URLs: h5p-offline-player@0.6.2 and h5p-runtime@0.1.2.
@missing-elements/h5p-embed 0.3.2
The embed page takes &lang=<language tag>, because it cannot read the language of the page that
embeds it. It requires the new player and runtime. Write and deploy your player domain again to get
them there.
Full Changelog: v0.6.1...v0.6.2