2. Providing your own texts in multiple languages
Section outline
-
To offer your own course content in multiple languages, a few things are needed in addition to the translation itself:
- A special course filter must be enabled (usually enabled by default), and
- the different language versions of the text need to be stored accordingly.
-
Excursus: HTML vs. WYSIWYG
At the end of the day, Moodle is just a website written in HTML (HyperText Markup Language, info). HTML is a markup language, meaning a way of structuring documents in which both the actual content and properties, relationships, and formatting are described within the same document.
An example:
<h3>Überschrift</h3>
<p>Dies ist der Text, mache Worte sind <strong>speziell formatiert</strong>.</p>In the HTML snippet above, an element of type headline with hierarchy level 3 (= h3) is created. Its beginning is marked by an opening tag (<h3>) and its end by the matching closing tag (</h3>). The content of the element is “Überschrift”, where German umlauts may - depending on the character encoding of the document - be written using the (outdated) entity notation (Ü = Ü).
This is followed by a paragraph (<p>...</p>), in which another string is formatted in bold (<strong>).All websites you see in your browser work exactly like this. Your browser is just kind enough to render the HTML code, meaning it does not show the raw HTML but instead displays the headings, paragraphs, and bold text as such.
Moodle editors, however, work in WYSIWYG mode, i.e. they try to generate standards-compliant HTML in the background from the text you enter. So if you format a text as a list using the editor buttons, for example:
- List item 1
- List item 2
- List item 3
it will appear like that in the editor input area. In the background, however, it is saved as an unordered list (<ul>...</ul>) with several list items (<li>...</li>)
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>