Activity

There is a small problem with lang attribute: if somebody uses <span lang="cs">?esky</span> <span lang="en">in english</span> without multilang filter both would be visible, with it only one of them. This might confuse people that know nothing about our multilang implementation. If there is only one <span> or <lang> tag, it works as expected.

Petr Skoda
added a comment - 01/Dec/06 6:20 AM There is a small problem with lang attribute: if somebody uses <span lang="cs">?esky</span> <span lang="en">in english</span> without multilang filter both would be visible, with it only one of them. This might confuse people that know nothing about our multilang implementation. If there is only one <span> or <lang> tag, it works as expected.

Yes, this is a tricky problem. <span lang="es">blah</span> is the best correct way to mark up text that is meant to be in a specific language, and such tags are not broken by the HTML editor. The proper solution for this bug is to mark up text that way.

However, like Petr said, there will be confusion with our multilang implementation, which uses the same tag. (Note that the <lang lang="es"></lang> form is obsolete and should not be used at all, we support it only for backward compatibility). As above, I think this tag makes good sense to use for this purpose so that when those texts end up in non-filtered circumstances they still work.

So we need something else to distinguish multilang text from other normal text that may contain multiple languages.

Martin Dougiamas
added a comment - 06/Dec/06 12:38 PM Yes, this is a tricky problem. <span lang="es">blah</span> is the best correct way to mark up text that is meant to be in a specific language, and such tags are not broken by the HTML editor. The proper solution for this bug is to mark up text that way.
However, like Petr said, there will be confusion with our multilang implementation, which uses the same tag. (Note that the <lang lang="es"></lang> form is obsolete and should not be used at all, we support it only for backward compatibility). As above, I think this tag makes good sense to use for this purpose so that when those texts end up in non-filtered circumstances they still work.
So we need something else to distinguish multilang text from other normal text that may contain multiple languages.
Should we perhaps add a class to one of them?
<span lang="en" class="multi">
or
<span lang="en" class="nonmulti"> ?

Martin Dougiamas
added a comment - 06/Dec/06 12:47 PM Thinking further, the menu could contain two lists of languages, the first as normal and the second as "language-dependent text" (multilang).
Selecting from the first would just insert the normal span tags.
Selecting from the second would insert the span with a "multilang" class in it.
Then we'd need to:
1) Modify the filter to only work when
there is more than one language section in the text
the multilang class is used.
2) For backward compatibility, search/replace the database for any occurrences of the old multilang tags and fix them up.
How does that sound?

Vy-Shane Sin Fat
added a comment - 08/Dec/06 12:48 PM I've just checked in a fix for the editor.
The editor now has a language drop down that allows the user to tag (via spans) content as being in different languages. E.g:
<span lang="fr">Bonjour!</span>
The above will tag the "Bonjour!" as French. If we want to tag a selection for the multilang filter, the format is:
<span lang="fr" class="multilang">Bonjour!</span>
We still need to fix the old multilang tags.