How to translate content

Hello. Can anyone tell me how to translate my H5P activities please? I'm using TranslatePress on my WordPress site. I gather it isn't possible to translate the activities using that plugin though? The default language of the site is Welsh. Any guidance on this would be greatly appreciated. Thank you

otacke's picture

Hi!

Maybe https://snordian.de/2023/01/16/how-can-i-improve-h5p-translations/ will give you the answers that you are looking for.

Best,

Oliver 

Thank you for suggesting the web page. However, I'm not sure where it gives advice to translate H5P activities on WordPress sites? Sorry, I'm new to the plugin so not sure how it links up with TranslatePress for example. 

BV52's picture

Hi gareth94,

Translations for H5P are not platform specific but rather content type specific. What I mean with that is the translations are needed to be created within the content types themselves, then the our developers would need to review the code then release these translations for them to appear in Wordpress and other platforms. The page that Oliver linked to above provides steps on how to contribute the necessary translations for a specific languange, in your case Welsh.

-BV

I see what you mean. However, I need to translate actual questions and answers (not just the UI interface) that are specific to my website only. I wouldn't want the translations to go back to your developers as they will be sensitive questions on a password protected site. I therefore do want the information shared with anyone external to the site. Hope that makes sense? I tried to translate the activities using TranslatePress but it wouldn't allow me to select the text to translate them. 

otacke's picture

Hey!

Let's see if I understand this: You have some content created, entered text in language A and want the user to see the same content in language B instead. That would be something different than BV and I assumed. You would need to clone the content and create a version in language B. Unfortunately, there's no solution that I know of to dynamically change the language of H5P content. H5P content types are separate "apps" (that can run anywhere, not just on WordPress) that do not receive their translations from the WordPress plugin, that is why your approach does not work.

Cheers,

Oliver 

Thanks for your response. Yes I would like the language of my questions/answers to change to the secondary site language when the user toggles the website language switcher (i.e. from English to Welsh). Surely this must be possible within H5P/WordPress?

otacke's picture

As I said: Unfortunately, there's no solution that I know of to dynamically change the language of H5P content.

If there's a WordPress plugin that can render parts of a page only if a certain language is chosen, then you can clone your H5P content, translate it and show/hide both based on the language that is set.

Best,

Oliver