Help for translation

Hi  everybody,
i trying to put French translation for H5P.
I saw thaht there is some post in this subject in the forum but i can't reach my goal.
I want to translate all H5P editor button (alt) and all texts in editing mode.
I import the fr semantics in database wp_h5p_libraries_language but nothing append.
Please can someone help me or do you have a complete tutorial for translation ?

Thanks

PS : i'm use WP

fnoks's picture

Hi,

Translating H5P for WP consists of several different tasks:

  • Translating the content types (should be ok for most content types already): language files are part of the library itself, and you can find them on GitHub. E.g for course presentation: https://github.com/h5p/h5p-course-presentation/blob/master/language/fr.json. 
  • The H5P editor: This already has a french language file (https://github.com/h5p/h5p-editor-php-library/tree/master/language)
  • Translating editor widgets: The editor widgets (e.g InteractiveVideo) seems to be missing french (https://github.com/h5p/h5p-editor-interactive-video/tree/master/language) So here fr.json needs to be added. 
  • Translating WP-plugin: The H5P WP-plugin already contains a french language file (https://github.com/h5p/h5p-wordpress-plugin/tree/master/languages)

If you want to change these texts, or add new ones, please do this using GitHub's pull request feature. Then these texts will be part of future versions.

Are you planning to translate all content types to french? 

Thanks,
yes i will translate all contents

i want to translate the content type "course presentation" to Greek.

What is the procedure?

thomasmars's picture

Check out the H5P contributing guide, under Translating Content Types: https://h5p.org/contributing

ok,

i downloaded a *.json file (from github) and i am now translating the texts.

How can i use this json file to see my changes live. It would help me translate better

thomasmars's picture

First you would have to put the translated json file inside the "language" folder of that library. Make sure it has the correct ISO code. (e.g. fr.json). If you're using development mode that would be it, otherwise you would have to pack the library (using H5P CLI) and upload it to your server.

You also have to change the language of your site, which depends on which CMS you are using. If you're using drupal you would enable language support with the following: https://www.drupalgardens.com/documentation/language/single

 

Hi thomasmars

I use Drupal
I will add the translation, but no changes will be made
What should I do for language support?
The link you placed is not available.
https://www.drupalgardens.com/documentation/language/single
Thank you for your advice.
Thanks

BV52's picture

Hi Amir,

I think languange support for Drupal is now integrted please check this page for more details.

-BV52