Multi-lingual Content filter

From MoodleDocs

Overview

multilangsecond project is a Moodle filter add-on.

  • It is a more flexible version of multilang filter.
  • It has an admin setting filter_multilangsecond_mode.
  • If this setting is set to 'Yes' non html syntax can be used for multilang blocks like:
{mlang en}English{mlang}{mlang bg}Bulgarian{mlang}{mlang sp}Spanish{mlang}{mlang fr}French{mlang}

{mlang en}English{mlang}{mlang bg}Bulgarian{mlang}{mlang sp}Spanish{mlang}{mlang fr}French{mlang}

Otherwise

  • Or, otherwise, language block is a serie of identical html tags with lang="XX" attributes:

Use in paragraphs

<p lang="en" style="...">Paragraph in English</p>

Paragraph in English


<p lang="bg" class="...">Párrafo en Español (Paragraph in Spanish)</p>

Párrafo en Español (Paragraph in Spanish)


<p lang="bg">Параграф в българското (Paragraph in Bulgarian)</p>

Параграф в българското (Paragraph in Bulgarian)


<p lang="ro">Paragraf în limba română (Paragraph in Romanian)</p>

Paragraf în limba română (Paragraph in Romanian)



Use in headings

<h1 lang="en">Heading in English</h1>

Heading in English


<h1 lang="bg">Encabezado en Español (Heading in Spanish)</h1>

Encabezado en Español (Heading in Spanish)


Old syntax use

The old syntax with <lang> tags is valid too.

See also