Skip to content

Add multilingual support for exercise descriptions and tips to be displayed in the exercise implementation #2928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AutoPING-TUI
Copy link

Implements and closes #2743

To improve maintenance of exercises in multilingual teaching scenarios it would be great to provide exercises with exercise descriptions in several languages rather than working with translated copies of a task. CodeOcean has already multilingual support. However, it is restricted to its GUI. An promising approach can be Moodle's Multilang Content Filter: Attributes (lang="XX" and class="multilang") are used to indicate the multi-language nature and to specify the exact language of a content element. CSS is then used to control the visibility on the page.

When editing the exercise description the instructor had to use the suggested attributes as shown in the examples below:

Example 1 (separated paragraphs):
example1

Example 2 (Inline separation of multilingual text):

<p><span class="multilang" lang="de">Implementieren Sie eine Funktion, die für einen gegebenen Parameter entscheidet, ob er gerade oder ungerade ist.</span> <span class="multilang" lang="en">Implement a function that decides for a given parameter whether it is even or odd.</span></p>

German:
de

English:
en

MrSerth

This comment was marked as resolved.

@Cbblr Cbblr force-pushed the multilang-text branch from ff93042 to 00f3e8f Compare June 3, 2025 10:30
AutoPING-TUI and others added 2 commits June 3, 2025 12:40
Aligning the code with the style of this repository.

Co-authored-by: Sebastian Serth <MrSerth@users.noreply.github.com>
Copy link
Member

@MrSerth MrSerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adressing all my comments, I really appreciate it! Otherwise, I just made another minor suggestion.

💁‍♂️ We should squash some commits during merge to get a clean, linear history without too many small amendments caused by the review. Please, do not just "rebase" (nor "merge").

Co-authored-by: Sebastian Serth <MrSerth@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants