Multi-Language Content (v2)
Maintained by
Iñigo Zendegi Urzelai, Iñaki Arenaza, Kepa Urzelai
This filter is a greatly simplified multi-language filter. It uses very simple non-HTML tags to mark multi-language blocks. Namely {mlang XX} {mlang} pairs, where XX is the Moodle short name for the language pack (i.e., en, fr, eu, es, es_mx, etc.)
It uses the same tags as the filter_multilangsecond plugin (to be compatible with it), but there is one difference between the two. This filter allows standalone {mlang} tags that don't require adjoining alternative language tags. This makes the filter more flexible at the cost of potentially producing empty sets of tags.
Comments
Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.
I'm not enterely sure what you want to achieve.
If what you want is having the section name text depend on the user browsing language (i.e., showing 'Unit 1' while browsing the course in English, 'Unité 1' while browsing it in Frenche and 'Unidad 1' when browsing it in Spanish), you need to do a couple of things:
* Enable the multilang2 filter and configure it to be applied to both "Content and headings" (the default is just "Content")
* Set the section name to "{mlang en}Unit1{mlang}{mlang fr}Unité 1{mlang}{mlang es}Unidad 1{mlang}" (without the quotes).
That should do it.
Saludos.
Iñaki.
How would you enable the Unit Section name to better utilize this filter?
For example:
If you have "Unit 1" as the Section name , and since it's not HTML encoded, "Unité 1" would be also be displayed as a part of the Section name if you have a English/French course.
Hopefully this make sense. Thank you so much!!
Kind Regards,
Harley
I'm a bit late to the discussion, but my goal is to keep the filter as simple as possible. Even if it doesn't cover everyone's particular needs.
The ultimate goal is to make the behavior and the mechanics of the filter as explicit and simple as possible, so everybody knows how to use it and what to expect from it, without having to think about hidden/unintended side effects (like 'what text will be displayed if the user is browsing the content with a language that is not one of the tagged ones?' or 'will putting the language tags at this place break the HTML, and render it invalid or unusable for accessible browsers?')
Saludos.
Iñaki.
por lo que he visto en la versión de desarrollo de Moodle (rama master, que en su momento se convertirá en 3.1) , no hay cambios en cuanto a la forma en la que trabajan los filtros (este plugin se simplemente un nuevo tipo de filtro).
Por lo que si no hay cambios en ese área, funcionará sin problemas.
Saludos.
Iñaki.
Brandon
I will try to work on some courses with this plugin, it is very easy to use in combination with the attorney plugin. Maybe I just need to move away from the idea that if no other language is available than print the default one.
But it might take me some time.
In order to implement the feature you are requesting, there would also need to be a requirement in place to have at least one alternative language available - just like the multilang_second plugin. Otherwise there would be no way to determine if text in a particular language not wanted or is simply not available.
I can see two ways to move forward with this:
1) Request that this be a a feature added to the multilang_second plugin, where multiple languages are requirement for each set of tags.
...or...
2) Add the multi-language requirement feature to this plugin, in which case the optional feature you want could then also be added.
Of course there is always the third option of always making sure there are tags available for every language you want to display, even if it means putting English text in a non-English set of {mlang} tags.
There is also an accessibility issue to consider. The English text would have to be in a HTML container that has a lang="en" parameter so as to ensure that screen readers could properly pronounce the English text on non-English pages.
The simple way around this would be to also have another new tag called something like {olang en}text{olang} which would simply be replaced with text. You could then put this inside the {mlang en} tag without having to edit any HTML.
Together they would look like this:
{mlang en}{olang en}text{olang}{mlang}
I developed something like this as a separate plugin for my client at www.instruxmedia.com. Unfortunately they have not made it freely available in the plugins repository on moodle.org however you should feel free to contact them.
Either way, this would be an enhancement that could only be implemented if there is a mandatory condition to have at least 2 languages present.
Best regards,
Michael Milette
One clarification that is an issue for us as we have MOODLE in 7 different languages.
For us it would be very useful if when there is no content in the chosen display language to still print the the default site language which is English.
As I read from the description it was intended to do so however this is different from multilang_second or the original MOODLE multiple languages support.
Again, thanks very much!
Thanks Iñaki for sharing this plugin with the Moodle community. I was able to successfully test it without issues. When reviewing the code, I spotted couple of places that could be improved - especially with regards to performance impact of the filter. Please see your tracker for details.
You could consider improving the plugin page here in the directory too. What about shortening the summary text to just a sentence or two, and moving all the useful information into the description field. I also think that plain text formatting does not look too good for that field - Markdown is my favourite
Said that and with the hope that raised issues will be fixed in a future update, you are cleared to land now. Welcome to the Plugins directory!
http://integration.moodle.org/job/Precheck%20remote%20branch/20246/artifact/work/smurf.html