Перевод h5p

Опубликовано Ksenia-Polo - вс, 07/29/2018 - 09:32

По интферфейсу https://h5p.org/documentation/for-developers/translate-h5p-libraries

Из коробки возможна  частичная интеграция.

При выборе в типе материала Enabled, with field translation появляется вкладка перевода, но при редактировании потом на вкладке перевода изменения добавляются в русскоязычныю версию, а английский язык включить не получается в пееключателе, кнопка просто не активна, при вводе en в адресе URL, выдается ошибка 404. Способ перевода "Включено, с переводом" не работает.

Стала искать по переводам через UI, и здесь пишут что приходится дублировать разными материалами
И в ходе еще наткнулась на следующую фразу об импорте
(здесь https://wordpress.org/support/topic/translate-h5p-content/)
предлагают wp-export plugin to see if it will export/import H5P content.

 

По переводам на примере Wordpress:

https://h5p.org/node/868

Такие файлы JSON нужно добавить в папку language  https://github.com/h5p/h5p-summary/tree/master/language

Там же пишут, что "In the newest version of the Timeline H5P it is possible to select which language should be used."

Но по версии от 2017 года (https://wordpress.org/support/topic/translate-h5p-content/)

На вопрос о том можно ли переводить:

"Is there any recommendations on best practice to translate H5P content besides just duplicating the item and naming it itemname_FR for example?

Ответ, что лучше пока дублировать:

Currently, the only way to do this is to create duplicate content.

 

 

"
targeted the content.json file inside the wp-content/uploads/h5p/export/*.h5p files, but you’ll still face the issue of having to upload each file after changing it.

 

One other way of doing it is to create a small script that loops through the content in the database