插件过滤器

Multi-lingual Content

filter_multilangsecondVanyo Georgiev

  • Moodle 1.9–5.1
  • 更新 2015-10-17

This filter is a more flexible version of multilang filter. One of three possible choices can be selected by the filter admin setting: HTML syntax, Non HTML syntax or
Both. If the non html syntax is chosen language block looks like: {mlang en}English{mlang}{mlang bg}Bulgarian{mlang}. In case of Html syntax, language block is a sequence of identical html tags with lang=”XX” attributes span or div or any other.
This filter is a more flexible version of Moodle multilang filter.
It has an admin setting filter_multilangsecond_mode.
One of three possible choices can be selected by this setting:
* HTML syntax
* Non HTML syntax or
* Both
In case of HTML syntax the language block is a sequence of identical
html tags with lang=”XX” attributes:
<h1 lang=”en” xml:lang=”en”>Heading in English</h1>
<h1 lang=”bg” xml:lang=”bg”>Heading in Bulgarian</h1>
or
<p lang=”en” xml:lang=”en”>Paragraph in English</p>
<p lang=”bg” class=”…” xml:lang=”bg”>Paragraph in Bulgarian</p>
<p lang=”ro” xml:lang=”ro”>Paragraph in Romanian</p>
Note: In headings only the “official” multilang HTML syntax with <span class=”multilang” lang=”xx”> tags works. Example:
<span class=”multilang” lang=”en”>English Title</span><span class=”multilang” lang=”bg”>Заглавие на български</span>
This is because of removing of other html tags by format_string function.
The old syntax with <lang> tags is valid too.

返回插件目录