Moodle allows you to have multilingual content ready to be displayed to the user, depending on their settings. The original documentation in English is here.
The multilingual content filter allows you to create resources in multiple languages. When enabled, it looks for tags
<spanlang="xx"class="multilang">
that indicate that the text contains various languages. Then it selects and displays the text in the user’s language (as set in the browser or the user’s preferences).
How to create multilingual content
First, create content in multiple languages (in the same source) to use this feature. Then enclose each language block (or multilingual block) in the following tags:
<spanlang="cs"class="multilang">Text v češtině</span><spanlang="en"class="multilang">Text in English</span>
Important
Both elements should be close to each other.
For these tags to work when editing text in a text editor, it is necessary to be in code editing mode (for HTML editor, open the advanced menu (1.) and press </> (2.)) and then insert.
Otherwise, any titles or labels can be formatted using these tags directly in the text box.
The code must be inserted in the same element, e.g. the following code:
<p><spanlang="cs"class="multilang">Text v češtině</span></p><p><spanlang="en"class="multilang">Text in English</span></p>
is incorrect - each block is in a different element <p></p>. The correct format in this case would be as follows:
<p><spanlang="cs"class="multilang">Text v češtině</span><spanlang="en"class="multilang">Text in English</span></p>
If you have a problem displaying both or neither language versions on the page, the cause is a wrong code format.