How to change for once and forever the "Text overrides and translations" in Interactive Video? (Moodle)
Hi everyone! In first, my English is poor, I'm really sorry for that (russian is native).
I using only Interactive video in H5P. There is a lot of education videos... And I need every time translate for my native language the "Text overrides and translations", when I adding videos. It's really annoying. Unfotunatelly, I'm not the coder or someone like that, and I don't get how I can switch this block to my native lang. I have accsess to FTP of my Moodle and can't find there any h5p's file with "Text overrides and translations".
I'll be grateful for any tips and instructions how to translate this.
BV52
Fri, 10/05/2018 - 05:08
Permalink
Hi Lira,The easiest way to do
Hi Lira,
The easiest way to do this is create a "template". If this is an Interactive Video, create one without any interactions and place your translations. Download it locally and upload it everytime you are creating a new activity. This way you do not need to place the translations everytime.
-BV52
Lira
Fri, 10/05/2018 - 07:37
Permalink
Good idea!
Wow, I'll try! Thank you
AleScand
Fri, 06/26/2020 - 14:27
Permalink
Empty interactive video translation
Hi,
there's a way to save an empty interactive video template (without videoclip) just for edited texts? I publish many interactive videos on the platform and I would like to override everytime the texts (which are not just translations) automatically and permanently. Thank you!
BV52
Fri, 06/26/2020 - 18:44
Permalink
Hi AleScand,I'm afraid this
Hi AleScand,
I'm afraid this is not possible.
-BV
AleScand
Wed, 07/01/2020 - 12:23
Permalink
Hi and thank you for your
Hi and thank you for your kind feedback.
I'm aware that it is not the best solution, but there is a way to manually edit the main language file to override text? Is this file present locally on my Moodle installation? Thanks
AleScand
Wed, 07/01/2020 - 12:24
Permalink
Hi and thank you for your
Hi and thank you for your kind feedback.
I'm aware that it is not the best solution, but there is a way to manually edit the main language file to override text? Is this file present locally on my Moodle installation? Thanks
otacke
Wed, 07/01/2020 - 23:15
Permalink
Hi!Have you familiarized
Hi!
Have you familiarized yourself with the alter_params hook that H5P offers? It can be used to, well alter all parameters that can be set in the editor - so you could basically override the default language settings. Please consult https://h5p.org/node/2692 and choose your host system (Drupal, moodle or WordPress customization).
Best,
Oliver
AleScand
Thu, 07/02/2020 - 10:05
Permalink
Hi Oliver and thank you very
Hi Oliver and thank you very much for your suggestion!!!
I'm on Moodle... so could I use "hvp_alter_filtered_parameters" hook in the renderer.php of h5pmod theme?
Would it be possible to have an example of syntax to intercept, for example, the "True" label of the "True / False" question, to better understand how it works?
Thank you very much!
otacke
Fri, 07/17/2020 - 19:43
Permalink
Hi!You could. Have you had a
Hi!
You could. Have you had a look at https://github.com/h5p/h5pmods-moodle-plugin/blob/master/renderers.php#L85-L92 ? You should see how you can check for a particular content type, and then you simply parse the $parameters object that follows the structure of (https://github.com/h5p/h5p-true-false/blob/master/semantics.json) and overwrite what you want to override.
Best,
Oliver
ms930
Tue, 06/29/2021 - 14:41
Permalink
HiI'm having trouble figuring
Hi
I'm having trouble figuring out the syntax for changing "True/False" to "Good/Bad", in semantics.json we have:
"options": [ { "value": "true", "label": "True" }, { "value": "false", "label": "False" }
In the file renderer renderers.php in the theme h5pmod we have:
public function hvp_alter_semantics(&$semantics, $name, $majorVersion, $minorVersion) { if ( $name === 'H5P.MultiChoice' && $majorVersion == 1 ) { array_shift($semantics); } }
Now what is the code for parsing the parameters for Options if the value is "true" or "false" that I should insert in the public function hvp_alter_semantics?
otacke
Tue, 06/29/2021 - 19:44
Permalink
Hi ms930!Hope you'll find
Hi ms930!
Hope you'll find someone who has enough time to help you out. I don't this forum is a free code factory. I am sure that someone may support you if you show some effort to solve the problem yourself, but not if you just ask for someone to give you the code to solve your specific problem.
Best,
Oliver
ms930
Tue, 06/29/2021 - 20:30
Permalink
Thanks Otacke for your reply.
Thanks Otacke for your reply. Anyways, this is not my specific problem. I am not familiar with php and I wanted to have a sample code for local translation of h5p activities. Any code that overrides some semantics. I have no problem altering styles. Cheers
otacke
Tue, 06/29/2021 - 23:54
Permalink
If you're sure you really
If you're sure you really need the hooks: I am pretty confident that you'll find examples for altering semantics here on the forum. There's also demo code at https://github.com/h5p/h5pmods-wordpress-plugin/blob/master/h5pmods.php including useful helper functions.
ms930
Wed, 06/30/2021 - 09:58
Permalink
Thank you very much! That's
Thank you very much! That's exactly what I was looking for