How can i?

hefnjosch's picture

Hi.

I am using Wordpress.

How can i translate h5p files? My languale is Turkish. I wanna change some text. eg: B.C. (Before Christ)

E.g. for attachments image:

Attachments: 

Excuse me, have you a file.po to upload? I opened h5p-nb_NO.pot with poedit, but there is some error with quotation marks.

Thank you!

I resolved, I downloaded the WordPress plugin version. ;)

Thanks and congratulations for your work!

 

icc's picture

Ok, good. Looking forward for some more translations :-)

icc's picture

The translations has been added to the libraries. Note that the translation for h5p-summary was missing, instead of it.json I found a fr.json file with english texts.

Again, thank you for your contributions.

Italian translation for WordPress in attachment. :)

Attachments: 
icc's picture

It looks good, and I've added it to the plugin. It will be part of the next release of the plugin.

Thank you so much for contributing, and great work!

... but there are some problem with translation. Could you help me to resolve it, please?

I opened a new topic here to better organize threads:

http://h5p.org/node/2157

Thank you!

Hi

Do you need a German translation or is it already done. If not, I would be happy to do it.

falcon's picture

I don't think anyone is working on that at the moment, so it would be great if you could do it. I'll give you a new file tomorrow to work from.
falcon's picture

I probably forgot about this one. The files may be found here:
http://h5p.org/comment/1329#comment-1329

Hi Falcon, I'll be glad to try the Chinese (Simplied) translation.  Should I just download any of the above zip files, say, el.zip, and change all the el.json file names to zh-hans.json, after I tranlated them?

falcon's picture

Yeah, that would work. Thanks!

I have translated course_presentation to Simplied Chinese, but after I copied zh-hans.json file into the language folder of course_presentation, and set my drupal platform language to Simplied Chinese, nothing happened, still all English.   To do a reference check,  I tried setting language to Italian, it did show Italian language for course_presentation.  However, after I purposely modified some Italian translations in the it.json file, the text I modified did not get updated.  I cleared the cache, and even removed the it.json file, but still, nothing get changed.  I suspect that the system read the json file only the installation stage, and would not json files in the language at all after that.  So could you teach me how to enable the json file I just created in the system?  Thanks.

Typo: I suspect that the system read the json file only the installation stage, and would not read json files in the language folder at all after that.  So could you teach me how to enable the json file I just created in the system?  Thanks.

Just hacked into the database, and inserted my json contents into the language library, it worked.  I know this shouldn't be the right way, just want to compare the context to see if my translation is appropriate.  But, I also found that some menu message are still in English, such as the drop down menu on the top left corner, e.g. keyword list, always show, Auto Hide, Opacity.   I actually did have these words translated.  I crosschecked on the Italian language, and found the same, i.e. keyword list, always show, Auto Hide, Opacity are all in English.  Is this something need to be fixed, or I had done something wrong?  Thanks.

icc's picture

HI jingkuo!

Yes, just downlaod any of the zip files, i.e. tr.zip and the rename all the files you translate to zh-hans.json. The translation files has a structure and key value pairs. Do not change the structure or the keys, only the english text values.

Unfortunately there's no easy way to test the language files yet, there isn't any option to read them from disk on each request. The best way is probaby just to insert them into the database like you did. 

If you could zip the folder again and upload it here once you're done translating, we can add it to the content types and everyone will be able to have Chinese translations. Contributions like that is very welcome and helps make H5P better for everyone.

I've been translating the modules one by one, and since I have to play around each module in order to tranlate appropriately according the context, so it'll take a little to get all done. 

In the mean time, could you tell me how to translate the text not specific to the modules?  e.g. the drop down menu for all modules, the "Settings and texts" in all modules, and those words like "Edit Fill in the blanks", "Task image", "Task descriptions", "Text blocks", "Line of text", "Behavioural settings", etc.Thanks

For "modules", I meant content types

icc's picture

Are you using WordPress or Drupal? The generic UI strings that exists for all content types are translated through the CMS. so for WordPress you'll have do copy one of the .pot files in the plugin's language folder and use that. For Drupal you can add the translations to localize.drupal.org and then use the l10n_client module to download the translations to your site. 

The "Behavioural settings" should be translatable through the zh-hans.json file for the content types you are using. 

We know translating like this can be a bit cumbersome. Hopefully we'll get a better solution into place soon.

Thanks.  I'm using Drupal.  Did find those texts in lower level content types, such as blanks, summary, etc.  Halfly done, and would send to you soon.  Cheers

Hi icc, here's the Simplified Chinese translation file.  All passed jslint check. 

 
Attachments: 

There's problem in the previous uploaded Chinese json files, which jslint is not able to detect.  Please use this latest, all verified now

Attachments: 

Let me know if I can contribute, Cheers!

falcon's picture

I don't think we've received any german translations yet.

Here they are :o)

 

H5P file: 
Attachments: 

I've uploaded fr.json in /wpcontent/uploads/h5p/libraries/name_of_the_library/language/ but nothing happened... Have you got a solution?

icc's picture

Thank you so much for contributing. We'll add the language files to all the content types and the plugin. If you wish to make adjustments to the translations in the future the easiest way is to use the Edit button on GitHub when viewing the file. Your translation should be part of the next H5P release :-)

I'm sorry the JSON files aren't actually being used in production environments. When you upload an H5P the translation files are inserted into the h5p_libraries_languages table in your database.

To be able to test the translation, you must insert them into the database. You start by finding the id of the library you wish to translate:
SELECT id FROM wp_h5p_libraries WHERE name = 'H5P.Text' AND major_version = 1 AND minor_version = 0;

And then you insert the JSON content:
INSERT INTO wp_h5p_libraries_languages (library_id, language_code, translation) VALUES (22, 'fr', '{"content":"from","json":"file"}');

After that, you should see the translations when creating new content.

Again, many thanks for your contribution, I'm sure it will please many.

 

 

Ok, I'll try this procedure! I found (after many research!) it was in the database but I was afraid of modify the semantics.json which was inserted in, you save my time!

Congratulations for your work!

iulianghetau's picture

I am beginner, i try to translate Interactive video content to romanian. 

Where is locate the source file eng from interactive video content?  how to proce to insert new ro.json file into mysql database? 

thks for help

BV52's picture

Hi iulianghetau,

Thank you for offering to translate to Romanian. These are links where you can get additional information on how to do this:

https://h5p.org/contributing

https://h5p.org/node/935

If you have additional questions feel free to ask.

-BV52

thomasmars's picture

Translations for interactive video content are found in their respective library folders. Translations are moved into your database upon installation of the library. See https://h5p.org/documentation/for-developers/translate-h5p-libraries.

If you just want to translate content you can always do that in the H5P editor for your content, all UI strings should be changeable.

All is here, import it directly in the database. There was lots of error into the first release

Enjoy!

... in french was not correct, here is the correct one.

icc's picture

Thank you. I've added the language files to the WordPress plugin. They can be adjusted by clicking the edit icon here: 
https://github.com/h5p/h5p-wordpress-plugin/blob/master/languages/h5p-fr_FR.po

Unfortunately, the language strings used in the editor is in a separate file. Do you think you could update these? 
https://github.com/h5p/h5p-editor-php-library/blob/master/language/fr.js

Regarding the WordPress translation, I'm not quite sure about using les exercises, wouldn't le contenu be more descriptive? You can decide :-)

I'll continue adding the translations for the content types now.
Thanks for your contributions!

icc's picture

The language files have now been added to the libraries, and can now be edited on GitHub, e.g. https://github.com/h5p/h5p-course-presentation/blob/master/language/fr.json

icc's picture

I've also merged your pull requests. Very good job :-)

Thanks!

Hi,

  • Do you need the .json files or the .sql files are enough?
  • For the translation of "content" and "libraries", it's not very easy because "librairie" in french is a books seller and "content" hasn't a precise translation, "contenu" suggests a quantity, or what can be found inside a document, not really the document... I suggest to let "exercices" for content  and "activités" for libraries until I (or someone else) found better... "activités" suggests the type of content that can be built, and "exercices" suggests the content's done.

"Unfortunately, the language strings used in the editor is in a separate file. Do you think you could update these? 
https://github.com/h5p/h5p-editor-php-library/blob/master/language/fr.js "

I'm afraid I can't understand, I have edited the fr.js, removed the ê and ô and added 3 lines: was it the problem?

icc's picture

Sorry, my mistake, it though the editor translations had been forgotten, but they're there :-)
Everything seems to work like it should now, very good work!

  • Editing the JSON files on GitHub is the easiest way for us
  • Ok, I'm not good at French so we'll leave it like you say.

Again, thanks for you contribution, it is very much appreciated by everyone!

Hello i Added all semantics in database but libraries are still in English in Wordpress.
Maybe i forgot something ?
Please help

icc's picture

The H5P Content will use the same language as you site, so make sure you've selected the correct language under general settings(/wp-admin/options-general.php)

My default language is French...
that's why i can't understand

I've started the German translation. 

For now I've translated only the interactive video though.

 

Attachments: 

Where should I download the file for doing so?

thomasmars's picture

To translate content types go to https://crowdin.com/projects/H5P. More info can be found in the contributing section.

Hello! I would like to make a translation into Russian. 
I also need it to work on the Drupal site
I have installed the module https://www.drupal.org/project/potx to extract standart Drupal translation files .po and .pot (to add translations) but this module can not see h5p module to translate or I can not find it with this module.

should I look for zip files on github? for each content type?
What is the difference for translation of the Drupal module h5p and libraries for each content type?

how can I integrate it with Drupal?
Can I add them manually on my site or I need to wait untill h5p admnis will add new files to the Drupal module and to the libraries?

Shoild I look for zip file for the module? Should I look for libraries translations .zip for each content type?

What should I do after I find them?

How can I add translations and in what folders or where should I add edited files after editing?

tim's picture

Hi ksen-pol,

There are two levels of translation you can do: 

1. The H5P Editor 
2. The libraries e.g. Interactive Video, Course Presentation 

The easiest way to contribute translations is to create an account at CrowdIn.com and use the graphical interface there to translate the libraries you wish to translate. I will be adding the editor library itself soon. The downside is that it will be a bit difficult to test these translations locally.

If you are a developer please check out the steps below:

1. The H5P Editor
If you are a programmer and familiar with Git, just clone the following repo into your drupal installation:
https://github.com/h5p/h5p-editor-php-library

And create a new JSON file labelled ru.json where the other language files are. You will be then be able to test your Russian translations locally.

2. The Libraries
If you follow the documentation for developers it should be quite clear how to translate and test your libraries locally:
https://h5p.org/hello-world-translations

Let me know if you have any other questions!

Also, please post to only one forum. I think I've seen this same message on three different channels :) 

Hello! Thank you very much!
1) Do I understand right that if I work on  CrowdIn.com then I need to wait for someone to add my translation to the h5p.org site and then need to download libraries of content type with added translations?
How long it usually takes?
On what page on  CrowdIn.com should I work? I can not find.  Is it just an editor of files? Or it contains files to be translated ?
2) Yes I use git. But I am not very good in it. I just make commits and copy paste some commands.
When I clone it in what directory should I put it?
Can you help me with the git command to clone it right? (just to copy and paste)

3) As for translation of libraries
I see the page https://h5p.org/hello-world-translations
What shoukd I do after adding support for my language by creating .json file?
How I translate buttons and so on after it?
4) I have posted 2 topics (here and on the drupal.org to find more information particually about Drupal. I don't need to dublicate on drupal.org? Right?)

Pages