How to setup multilingual content in Moodle

How to Set Up Multilingual Content in Moodle: 3 Simple Steps

Hey Moodlers

We’re back with another guide for you!

Do you have a Moodle LMS running in multiple languages? If you’re experiencing content creation or content set up issues on your Moodle site, this article is exactly what you would need right now!

Setting up multilingual content in Moodle can be an uphill task. This is especially true for the older versions of Moodle. However, with upgraded Moodle versions, there’s an easy solution that you can try out for the creation of content in different languages in a simplified way. 

Here’s a crisp guide for you to follow with some extra bits of information. This can come in really handy if you’re a language teacher or are delivering courses to a diverse audience speaking different languages.

Adding Multilingual Content in Moodle Using the Multi-language Content V2 Filter – Method 1

Here’s how you can set up your Moodle course to support multiple languages for the same content. This will help you change your course content from one language to another based on the student’s language preference. 

The bottom line – You will be able to connect with your students better by making your content more relevant as there will be no language barriers! Yay

Here are some initial steps to follow before we go on to use the actual filter:

Step 1 – For starters, you will need to install the Moodle language packs for each of the languages you want to support or have courses in. 

Step 2 – Post-installation, a language selection menu in the Moodle navigation is displayed. This menu will help your learners opt for the language of the course of his/her choice. 

Remember – Moodle does not translate things for you

Just a heads up – You need to first write all your courses yourself in all the languages you need, in the resource (web page, label, book etc).

Step 3 – Install the Multi-Language Content (v2) filter Moodle plugin

Step 4 – Enable it for both Content and Headings

The best part about this is, you don’t need to have any HTML understanding or any kind of technical expertise in order to perform these steps.

Now, before we take a look at how to use this plugin, here’s a little background information about it.

This filter or plugin uses simple non-HTML tags to mark multi-language blocks. The tag used is {mlang XX} {mlang} pairs, where XX is the Moodle short name for the language pack (i.e., en, fr, eu, es, es_mx, etc.)

Step 5 – Once you’re inside the activity of your choice, here’s the syntax that you need to follow

{mlang es}This content will only be available in Spanish/text in Spanish{mlang} 
{mlang fr}This content will only be available in French/text in French{mlang}

So, when your learner opts to view Moodle in Spanish, you will only see the Spanish text.      When viewing Moodle in French, your students will only see the French text. You can actually have as many languages as you want by repeating the series of {mlang} sections.
Under the Apply To column, you would want to apply the filter to your content. Therefore, you would select Content from the drop-down. As mentioned before, if you want your headlines to appear in your chosen set of different languages, you even have the option to select Content and Headlines from the drop-down menu.

It is important to keep in mind that you also need to specify the localized language code if you are using such a language pack. In case of localized languages, make sure you download the parent language packs as well. 

Here are the child language packs that require parent language packs to be installed too:

  • ca_valencià (which requires ca)
  • de_du, de_kids and de_comm (which require de)
  • en_us, en_ar, en_kids (which require the default en)
  • es_ve (which requires es)
  • es_ve, es_co (which requires es)
  • es_mx_kids (which require es_mx)
  • fil (which requires fi)
  • fr_ca (which requires fr)
  • he_kids (which requires he)
  • ja_kids (which requires ja)
  • lt_uni (which requires lt)
  • no_gr (which requires no)
  • sv_fi (which requires sv)
  • wo (which requires fr)

Please NoteNew language packs can be directly installed inside Moodle

Be careful while using child language packs. Here’s the issue and its solution in detail 

Hiding your courses is not really an option available in Moodle. But Moodle provides an easy alternative to create courses in multiple languages by writing course content within the {mlang} set of tags. These tags allow the user to view content in the chosen language as well as change the content to any other language if required while browsing through the course structure. 

Now that you are clear with the basic information, let’s look at another method using the Multi-Language Content Filter. This is available as a pre-installed filter in Moodle. You just have to enable it in order to directly use it for adding multilingual course content.

How to use the Multilanguage Content Filter in Moodle – Method 2 (Recommended) 

Moodle offers a way to achieve multi-language content in your courses. You can use Moodle’s  Multi-Language Content Filter

We have listed the steps for you to follow to make the process easier.

The filter is already installed in Moodle.

Step 1 – Enable it globally by going into Manage Filters option, turn it  ON in the drop-down menu that appears under the Active column

Follow this path, in case you’re confused:

Site administration > Plugins > Filters > Manage filters

The filter is ready to use. You can have some demo content prepared in advance in order to test this out. 

Step 2 – Next, you turn the Editing On for your courses, then proceed with going to any desired activity inside your course topic, choose an activity, for example, a label for instance or a page/web page

Step 3 The next logical step is to notify Moodle of the language of every content piece you have written. 

You have successfully performed the first two steps. Now, it’s time to execute a very simple third step now!

Write the content in desired languages and tag translations with <span> elements

The multi-language content filter enables resources to be created in multiple languages. When turned on, it looks for <span lang=”xx” class=”multilang”> tags which indicate that a text contains multiple languages. Then it selects and outputs the text in the user’s language (as set in their browser or in their preferences).

Here’s how you do Step 3 and following is the syntax to achieve this:

-> Got to the desired course or course resource (For the purpose of the demo, we are editing the summary of the course)

Next, you expand the editing icons/options and click on </> icon.

After clicking on the </> icon, type the follow the below code:

<p><span lang=”en” class=”multilang”> 
Type Course content in English here 
</span>
<p><span lang=”es” class=”multilang”> 
Type Course content in Spanish/other language here 
</span><br></p>

Don’t forget to click on Save Changes

For the last step to check if it works or not, you simply have to click on the language drop-down in the top menu and choose your language preference. And there you have it!

Content displayed in English:

Content displayed in Spanish:

It is recommended that you create all the content in different languages using the standard Moodle editor and then edit the <span> elements accordingly with the HTML tag Editor. 

If you are aware of advanced HTML, you may even directly write your content using the HTML Tag Editor. This method presents users with multiple language preferences to choose from.

Voila! Now your Moodle is aware of the various language versions your courses are available in, to your students.

How to Create a Diverse Page 

What would you do if you want the text to appear in multiple languages on the same page? That’s when a special tag called {langx} comes into the picture. 

You can achieve this task with the help of the {langx} tag.

Here’s the syntax for the same:

{langx xx}Your text{/langx}

For example:

{langx es}Text or course content in Spanish/ 
Cómo aprender programación Java{/langx}  

{langx en}Text or course content in English/ 
How to Learn Java Programming{/langx}

This way, both Spanish and English text will appear on the same page wherever required. These tags also help with correct pronunciations by the screen reader in corresponding languages. 

If you want to place a word/text/company name with English pronunciation, on your Moodle site that’s predominantly in Spanish, you can use the {langx} tag. Simply enclose that text within the tag and the screen reader will capture the exact pronunciation considered appropriate as per that language.

These special tags are not available on learn.moodle.net or moodlecloud.com. You can only install this plugin on your Moodle site.

Working with Many Languages without Affecting UX

There’s another effective way to work with a multi-language course ecosystem or hide/display activities. You can use the Restriction by Language plugin for this. With this plugin, you can instruct Moodle to follow the user interface language. In response to this, Moodle will display or hide activities if the user interface is in a specific language. 

One of the Moodle developers suggested the following solution: 

You would need to create 4 activities in 4 different languages. The next step is to set restrictions on the languages and decide which language, out of the 4 displays, when your learners are viewing the site in, say English. 

Note from the developer – The challenge you may have with this approach is in assessing course completion status since all the learners will not end up completing the same activities.

If you are dealing with SCORM packages, it gets much more complex and will be a little different. You can still do it, however, you will need to build the language selection menu into the SCORM package as well as all of the languages. You may be able to have the default language controlled by Moodle but this may require some additional customization.

Applying these strategies, you end up with a single course that works in any of the languages it supports.

Conclusion

Try out these steps and let us know if you found this article helpful. Let us know your thoughts in the comments section below. Also, we would be happy to know if we have missed out on anything.

Leave a Comment

Your email address will not be published. Required fields are marked *