Localization of the Graphical User Interface
I'm thinking about multi-language support in H5P -- just for GUI elements such as button text or label text, etc. not for the content itself.
Presently, H5P uses the language of its host system for selecting the language. For example, the Wordpress PlugIn seems to fetch the global variable WPLANG from Wordpress, and this determines which language H5P will be presented in. This will probably be fine in most use cases, but in an international context it might be preferable to use the browser language instead if available (navigator.language || navigator.userLanguage) and to fall back to the host system language or English otherwise. Would this be a desirable (optional) behavior?
falcon
Mon, 05/15/2017 - 12:06
Permalink
The idea is that H5P should
The idea is that H5P should use the same language as the CMS. In Drupal you may tell Drupal to use the browser language and then H5P would do the same. I don't know how that works in WordPress, but are there use-cases where you'd want H5P's UI strings to be on a different language than the same type of UI strings of the CMS? Maybe when embedded?
otacke
Mon, 05/15/2017 - 12:27
Permalink
My employer going to host a
My employer going to host a course for an international audience soon on a moodle system. We can offer content in multiple languages by choosing a language using regular moodle features, but H5P does not switch languages for buttons, etc. So, either we'd need H5P to register when the language is switched (pages get reloaded), or H5P would simply use the visitor's language. However, we're not running the latest moodle plugin yet, so maybe this can already be achieved.
For me personally, I set up my "labs page" using Wordpress, and I'd love to present my visitors H5P content -- or at least the GUI in this case -- in their language if possible. I was thinking that checking the browser's language was the easiest way to achieve that.
falcon
Tue, 05/16/2017 - 11:41
Permalink
In H5P the interface strings
In H5P the interface strings are part of the content so it isn't possible to have them in one language and the content in another. I don't think anyone in the core team is familiar with the multilingual features of Moodle. We know how to make sure we support different languages, but we have to look into multilingual content. I've created an issue for it.
oncampus
Tue, 05/16/2017 - 11:43
Permalink
That's why I was talking
That's why he (= I, wrong account :-) ) was talking about the GUI only, but not the content ;-)
falcon
Fri, 05/19/2017 - 14:44
Permalink
Translation is a bit
Translation is a bit different in H5P since it is possible for authors to customize all strings, also the "GUI" strings like "Check, retry, previous, next". It makes GUI only translations harder but also gives author more control.
otacke
Fri, 05/19/2017 - 14:52
Permalink
BTW: Is there a way (planned)
BTW: Is there a way (planned) to do that "globally"? There might be some cases where it's a little tedious to replace the same string over and over again.
tim
Mon, 05/22/2017 - 09:49
Permalink
Yes, probably further down
Yes, probably further down the line.
kagoya
Tue, 05/23/2017 - 05:41
Permalink
multi-lang
I am not familiar with technical matters much, but moodle has a function called multi-language contents filter.
https://docs.moodle.org/28/en/Multi-language_content_filter
So, even in H5P, it is helpful to embed it, tags, flags in content can specify language.
otacke
Tue, 05/23/2017 - 09:42
Permalink
Thanks for the hint! ありがとう
Thanks for the hint! ありがとう。That's the way my employer adds content in different languages to moodle.
On the one hand, even if you added the class definition to H5P, there still would have to be a way to communicate between moodle and H5P in order to update the content whenever someone changes the language. On the other hand, H5P is not moodle-only, and there might be a better way to implement a multi-language feature that works with other host environments as well.
otacke
Thu, 06/22/2017 - 12:07
Permalink
Just stubled upon ticket HFP
Just stubled upon ticket HFP-1188. You're awesome!
tomaj
Fri, 06/23/2017 - 07:34
Permalink
Happy
I'm happy that you're happy! :) And I think it will be very useful for quickly creating content in multiple languages.
- Tom