New filter is aiting for approval

New filter is aiting for approval

by Vanyo Georgiev -
Number of replies: 4

I added a new filter to the Plugins directory a month ago. It still is "Waiting for approval"... sad

Average of ratings: -
In reply to Vanyo Georgiev

Re: New filter is waiting for approval

by Vanyo Georgiev -

Sorry for the spelling mistake in the subject of my previous post.

That filter you can download from https://github.com/vanyog/multilangsecond

Please, try the filter and give me some feedback.

In reply to Vanyo Georgiev

Re: New filter is waiting for approval

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Vanyo,

I was just reading about your new add-on which included a request for feedback.

Looks like a wonderful improvement to the multilang filter. The only problem I have with it is that you used the lang="xx" attribute to control the language. If I were to use it, I would no longer be able to specify text in an alternate language in my page.

For example, if I am writing an English page but actually want to have a French link on it, I would normally just do something like this in order to ensure that screen readers correctly pronounce the French text:

    <a href="http://www.website.com/" lang="fr">Liens en Français</a>

However, with your filter in place, such a link would not appear on the English page at all. Some might ask why not just translate the text and add an English version? Besides it not meeting requirements of the Government of Canada's web standards, you can't always do that. For example, in the case of a branch as in the case of a website or a company name.

My recommendation would be to maintain the requirement to also have the "multilang" class. For example:

    <a href="http://www.website.com/" lang="fr" class="multilang">Liens en Français</a>

I know it makes things a little more complicated but at least perfectly valid HTML will produce consistent and expected results.

Let me know if you want clarification on any of the above. I look forward to making good use of your enhanced plugin.

Best regards,

   Michael Milette

Average of ratings: Useful (1)
In reply to Michael Milette

Re: New filter is waiting for approval

by Vanyo Georgiev -

There must be no problem with a single link like:

 <a href="http://www.website.com/" lang="fr">Liens en Français</a>

because if it is not followed by another link with different lang attribute and it is not considered as a multilingual block and must not be effected by the filter.

In case you have more then one links like:

<a href="http://www.website1.com/" lang="fr">Liens 1 en Français</a>
<a href="http://www.website2.com/" lang="fr">Liens 2 en Français</a>

they do not form a multilingual block too, because in this case there is a repeated lang attribute and the links are not effected by the filter too.

I will explain such details in the filter's documentation soon.

Thank you, Michael