https://bugzilla.wikimedia.org/show_bug.cgi?id=3922

--- Comment #29 from Philippe Verdy <verd...@wanadoo.fr> 2012-02-29 16:28:51 
UTC ---
I confim that the solution using Bidi overrides is the worst one.
Testing the local language to see if it uses bidi or not is also not a stable
solution.

It is highly preferable to use CSS "unicode-bidi:embed" in separate spans, and
avoid ALL Bidi control characters that are highly dicouraged in HTML.

So a generated code like this will work much better :

Category : <span style="unicode-bidi:embed">Name1</span> | <span
style="unicode-bidi:embed">Name2</span>

Which can be easily generated in the code with:

$push = '<span class="category-item">';
$pop = '</span>';
$separate = '&nbsp;| ';
$t = $push . implode($pop . $separate . $push, $wgOut->mCategoryLinks) . $pop;

Each of the first three lines can be customized easily:
* the 1st line here can use a class name to allow other CSS presentation
features (it will include the standard "unicode-bidi:embed" property). No need
to test the default locale of the  wiki. This code can be very stable.
* the third line defining the separator should contain at least a standard
space, if the visible separator is made into the CSS properties of spans (using
margins, side borders, and padding).
* I see no reason why the second line would be something else, but it must
match the element name used in the first line, if ever you want to use list
items (<li>...</li>), the whole embedded in <ul>...</ul> (the CSS will make it
appear properly), in order to facilitate the integration of other skins (for
example an accessibility skin) and a more semantic tagging.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to