Enabling RTL direction for languages with LTR and RTL script variantes
Closed, ResolvedPublic

Description

Author: alefzet

Description:
For kk-cn being Arabic script need RTL direction


Version: unspecified
Severity: normal

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz6756.
bzimport created this task.Via LegacyJul 20 2006, 12:57 PM
bzimport added a comment.Via ConduitSep 21 2006, 11:17 AM

jimmy.collins wrote:

In r16586.

bzimport added a comment.Via ConduitOct 15 2006, 11:39 AM

alefzet wrote:

It is not affected for multi-variant wiki. direction always is 'LTR'. Setting $rtl = true; in
doughter MessagesKk_cn file ignored by MediaWiki.

bzimport added a comment.Via ConduitNov 6 2006, 6:02 PM

rotemliss wrote:

It's probably the problem of Bug 6100.

*** This bug has been marked as a duplicate of 6100 ***

bzimport added a comment.Via ConduitNov 7 2006, 8:27 PM

alefzet wrote:

This bug isn't duplicate 6100.
Try do following: install wiki with ltr/rtl script variants (currently it is 'kk' only). After that
click to قازاق tab. Interface and content will switched to 'kk-cn' (Arabic script), but the
direction still left-to-right.
I think: probably MediaWiki does not read setting $rtl = true; from MessagesKk_cn.php, and try read
from main messages file MessagesKk.php only.
Direction should be RTL when switched to 'kk-cn'. The variable $rtl should be readed 1) from
current messages file (current variant), 2) if $rtl is not in this file, read from main messages
file, and 3) default messages file (en).

Bellow is temporary quick&dirty Javascript workaround for this issue:

if (wgUserLanguage == "kk-cn")
{

document.write('<link rel="stylesheet" type="text/css"

href="'+stylepath+'/common/common_rtl.css">');

document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/rtl.css">');

}

(Place this statements to MediaWiki:<skin_name>.js)

bzimport added a comment.Via ConduitNov 8 2006, 8:40 AM

alefzet wrote:

(In reply to comment #4)
Forgot 'html {direction: rtl;}', so JavaScript should be:
if (wgUserLanguage == "kk-cn")
{

document.direction="rtl";
document.write('<style type="text/css">html {direction: rtl;}</style>');
document.write('<link rel="stylesheet" type="text/css"

href="'+stylepath+'/common/common_rtl.css">');

document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/monobook/rtl.css">');

}
And only place is monobook.js (other skins does not work).

bzimport added a comment.Via ConduitNov 8 2006, 1:29 PM

rotemliss wrote:

MediaWiki has two languages: interface language and content language. The
interface language is the langauge which the user selects: in preference, in
uselang, *or as a variant*. Most messages are used from this language. The
content language is used to get the namespaces and all the other things which
depend on the language of the content. Now, also the page direction is used from
the content language, though it should be used from the interface language.
That's Bug 6100. Here, the interface language is the variant ($wgLang - e.g.
kk-cn), and the content language is the main language ($wgContLang - kk). The
direction is read from the content language (kk), not from the interface
language (kk-cn), and that's the exact problem. If the software reads the
direction from the interface language, it also reads the variant direction, and
therefore it is RTL when using kk-cn. It doesn't for now, but if Bug 6100 will
be fixed, it will.

Remarking as a duplicate.

*** This bug has been marked as a duplicate of 6100 ***

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.