Language files : default is english but french translation exists ?

Hello !

I have a question about language files. When I create an activity, the admin interface is, for the most part, translated in french, but the default texts in the inputs fields are in english. So each time, I have to translate in french all the default texts from the frequent inputs (like "Show the solution" or "Retry" or "You have ... points out of ... points"). For instance, all the admin of the "Course Presentation" is in french but the default texts in inputs are in english (see screenshot 1 below). What surprises me is that if I look in this file : wp-content/uploads/h5p/libraries/H5P.CoursePresentation-1.8/language/fr.json, I can see that all these default texts are translated in french (see screenshot 2). So I'm wondering : shouldn't they be displayed in french in my admin too ? I've looked for a setting somewhere to switch everything to french but didn't find any. Is there something that I am missing here ?

Changing all the default texts to french everytime that I create a new activity is quite tiresome. If there is a tip to use the french language files instead, I would be glad. By the way, my french is far better than my english, so I can help to translate in french if needed.



Actually, I've just found out what is going on - well I think so.

Since yesterday, I've been creating activities with the various H5P types of content. Precisely I've created only one activity of each sort (for testing purposes). What happens is that the first time that I use a new type of content (by uploading on WP the .H5P file downloaded from download page), the admin interface is translated in french and the default texts are in english. But when I reuse the same "Type of content" to create a second activity, then everything switches to french, including the default texts that were in english in the first place. This is at least what has just happened with the "Course presentation". I've reused it to create a second "Course" and this time, all the default texts were in french (see screenshot below). So it seems that the french language file is only partially displayed the first time we use a new "Type of content" and after that, for the next exercise, it is completely loaded and displayed.

falcon's picture

Sounds strange. The first time, do you go and edit the content you uploaded, or do you create a new one the first time as well when you don't get the french defaults?

Not sure that I understand your question... but I've been able to replicate the "bug(?)" with the "Memory Card" game which is the last H5P activity that I can test. I've downloaded the H5P sample file on (the game with strawberries, raspberries and other red fruits... ) and uploaded it to WP. I've only made some changes in the pictures to be displayed and in the title of the game. The interface was in french and the default texts in english (see screenshot 1). I didn't change them. Then I've created a new "Memory Card" (in WP directly since the libraries are now uploaded) : this time everything is in french, including default texts, without me changing anything... (See screenshot 2)

This is not a big deal, really, but I think that this is not the plugin's expected behaviour.

falcon's picture

I see. Thank you for the feedback. The H5P you downloaded from is in English and will stay English until you have translated it manually. In the near future there will be a button you can push to instantly change all those interface/default texts to another language. Does that make sense?