Multi-language content filter
Content can be provided in two languages in RWTHmoodle. As a manager, you store the content in German and English, and a language filter automatically ensures that participants in the course room only see the text in the language they have currently selected as the system language in their profile menu.
The multi-language content filter can be used wherever HTML is used - for example, in text and media areas, in activity names and descriptions, or generally whenever the text editor is available.
Contents
- Option 1: Mark content as bilingual directly via HTML
- Option 2: Mark content as bilingual using the language filter button
Option 1: Mark content as bilingual directly via HTML
With the multi-language content filter, you can manually store content in two languages (German/English) using HTML. However, this option is more complicated than the second option below. Step-by-step instructions:
- Open the activity or resource in which you want to insert bilingual content (e.g., text and media field or page).
- Switch to HTML mode in the desired text input field by selecting View → Source Code in the menu bar.
- Insert the text in German and English. Enclose each language version in the following HTML elements:
<span lang="DE" class="multilang">Hier kommt der Inhalt in Deutsch</span>
<span lang="EN" class="multilang">And here is the same content in English</span>
- Then click Save.
- To verify that both language versions are displayed correctly, save the activity (“Save and return to course” or “Save and display”) and then change the system language in the profile menu. If both language blocks are visible at the same time, there is an error in the HTML code that you need to correct.
Option 2: Mark content as bilingual using the language filter button
The language filter can be used not only via HTML, but also conveniently via a globe button in the toolbar of the text editor. This allows bilingual content (German/English) to be stored without having to enter the HTML code manually.
Step-by-step instructions:
- Open the activity or work material in which you want to insert bilingual content (e.g., text and media field or page).
- First, create the desired text in German and English.
- Select the text in a language (e.g., German).
- Click on the language filter button (globe icon) in the editor toolbar
and select the appropriate language.
The text is automatically inserted into a language container that correctly identifies it:
- Repeat the process for the other language (e.g., English) by selecting the corresponding text passage.
- Click on the language filter button again and select the appropriate language (e.g., English). This text will also be automatically inserted into a language container.
- To verify that both language versions are displayed correctly, save the activity (“Save and return to course” or “Save and display”) and then change the system language in the profile menu. If both language blocks are visible at the same time, there is an error in the HTML code that you need to correct.
Notes and recommendations
- HTML mode and language filter button not available everywhere: In some input lines (e.g., when entering the name of a section, an activity, or in other places without a text editor), the editor toolbar is not available, meaning that neither HTML mode nor the language filter button can be used. However, you can still insert and save prepared HTML code directly in these fields - the language filter also works reliably in these fields.
- Files and external materials: The multil-lang content filter only works on texts that are stored in the course room in HTML format. Uploaded documents (e.g., PDFs) must therefore be provided separately in German and English.
- Bilingual content for more complex activities: For extensive activities (e.g., Quiz), all content - including questions, answer options, and feedback - would have to be maintained in two languages. This can be very time-consuming and confusing. In such cases, it may make more sense to create separate activities (i.e., one in German and one in English) instead of mapping everything in one activity using the language filter.
Further Information: