Language picker for the editor

Description

Add a language picker to the editor, to make it easier to create multi language content.

  1. The language picker must list all languages in the "languages" directory of the content type.

  2. When a language is selected, the strings from that translation will overwrite the current strings in the editor.

  3. The user will get a dialog to confirm that they want to overwrite (in case they have changed to custom strings, so they don't lose current changes).

  4. There should be instructions near the language picker, on how to provide translations (Crowdin if available)

Acceptance Criteria

Add "language picker" to the editor, that lists the languages with translations in the "languages" directory, for a content type.
When a language is selected, the strings in the editor are overwritten with the new language.

Activity

Show:
Oliver Tacke
June 20, 2019, 2:42 PM

Seems this has been implemented already, except for item 4 (instructions on how to provide translations).

Nadav Kavalerchik
July 1, 2017, 4:29 PM

Probably related to:

Nadav Kavalerchik
June 26, 2017, 8:23 PM
Edited

I have been playing around with this. trying to test the proper generic way for adding a language dialog to a content package,
and eventually looked at the way it was implemented in the H5P.TimeLine librery:
https://github.com/h5p/h5p-timeline/blob/master/semantics.json#L280-L506
And added it to other H5P libraries too.

Here is an example of the h5p-multi-choice library:
https://github.com/iucc/h5p-multi-choice/commit/3f2200a190f397ea6003fbbd944812d9659b18ee
Some RTL CSS selectors + a language menu (inside the semantics.json) + some initial Hebrew translation.
Also, patched moodle mod/hvp & editor-php & library-php, to be able to initiate the Editor based on the hosting environment (Moodle) current user language, if no language was set by the content (package.h5p)
https://github.com/iucc/h5p-php-library/commit/336441f5a2648f3210038ed9ac23d047881a35e2
And
https://github.com/iucc/h5p-editor-php-library/commit/b218c32d8075435e7f42729bdeb93a70a229228d
Plus a later update...
https://github.com/iucc/h5p-editor-php-library/commit/e99a854ac2f3c7c069e73cbf91299ab726edf46b

Attaching a sample package.h5p (with language menu + some Hebrew translation + RTL CSS fixes)

Please review, as I would LOVE any feedback so I can see if I am on the right track with this, before implementing it on other H5P Libraries.

Nadav Kavalerchik
June 23, 2017, 7:11 AM

Thanks

Tom Arild Jakobsen
June 23, 2017, 5:29 AM

This feature hasn't been implemented yet. When it is, the commits will show up on the right side column on this page.

Assignee

Unassigned

Reporter

Tom Arild Jakobsen

Labels

None

Funding

None

Code reviewer

None

Released

None

Time tracking

0m

Time remaining

30h

Priority

High