traslate title of library h5p
Submitted by mahnaz.afshar on Mon, 08/29/2016 - 09:10
Forums:
Hi.I want to translate libraries to persian language.and I do not know how to translate title of library.
I changed title of library in library.json but the title of library did not translate in selected list of "create h5p question".
Could you please guide me how to translate title of library
Thanks.
thomasmars
Mon, 08/29/2016 - 11:40
Permalink
Hi,
Check out the H5P contributing guide, under Translating Content Types: https://h5p.org/contributing
mahnaz.afshar
Thu, 09/01/2016 - 07:58
Permalink
How do I access the widget file in H5P
Thanks for your guide.
Please guide me Where is address of widgets folder?(How do I access the widget file in H5P)
fnoks
Thu, 09/01/2016 - 08:59
Permalink
Sorry, I am not able to
Sorry, I am not able to understand your question. What do you mean when saying H5P widget file? What are you trying to accomplish?
mahnaz.afshar
Thu, 09/01/2016 - 09:10
Permalink
i attached photo to better explain what i mean
I din't notice to how translate widget.I attached a photo to this comment To better explain what I mean.in each library i translated title of library but title do not translated.please guide me.
thomasmars
Thu, 09/01/2016 - 09:48
Permalink
Hi,
Judging from the image it looks like you are trying to translate the h5p-editor-image-hotspot-question library, which is an editor widget. That means it has a bit of a different approach to translating than a runnable library. You can check out the guide for translating editor widgets.
The basics are that you will find the translatable string in the JavaScript file, and then add a file with your language code to the language folder with the key of the translatable string from the JavaScript file. An example for norwegian translation can be found in nb.json. When you have added the new translation for your language to the editor widget you should create a pull request to the github repository.
thomasmars
Thu, 09/01/2016 - 09:51
Permalink
In order to test that you got
In order to test that you got the translations right, you can use the H5P CLI to pack the translated library and upload it to your test environment/server.
mahnaz.afshar
Sat, 09/03/2016 - 07:03
Permalink
Hi
Hi.
Thanks for your guide.I added:
// Default english translations
H5PEditor.language['H5PEditor.ImageHotspotQuestion'] = {
libraryStrings: {
noImage: 'You have not selected an image.',
done: 'Done',
remove: 'Remove hotspot',
rectangle: 'Create rectangle',
circle: 'Create circle',
guiDescription: 'Drag and drop the desired figure from the toolbar to create a new hotspot.'
}
};
in file "image-hotspot-question.js "
and I added a file with my language code(fa.json) to the translate folder language folder، But still have not been translated widgets.
and To translate as title of libraries What should I do?
thomasmars
Mon, 09/05/2016 - 09:31
Permalink
Hi,
You can not translate the title of an H5P library as far as I know.
Integrator
Sun, 10/08/2017 - 15:21
Permalink
Translate content type name and description
Do you know, Thomas, whether a issue has been opened for that request? Just to let people subscribe to it and be informed as soon as it is about to get implemented to come and help translating.
Thanks very much.
tim
Mon, 10/09/2017 - 09:28
Permalink
An issue has not been opened
An issue has not been opened up. I'll make sure it is announced through a blog post when the content type titles and their metadata are able to be translated.