[wp-trac] [WordPress Trac] #14129: RTL admin CSS files not loaded even if xx_XX.php states $text_direction = 'rtl';
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 28 13:19:47 UTC 2010
#14129: RTL admin CSS files not loaded even if xx_XX.php states $text_direction =
'rtl';
--------------------------+-------------------------------------------------
Reporter: codestyling | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: i18n | Version: 3.0
Severity: blocker | Keywords: RTL admin stylsheet bug
--------------------------+-------------------------------------------------
If you have a language file needs to be loaded with RTL support like
he_IL.php (languages folder), you will find inside
{{{
$text_direction = 'rtl';
}}}
So if you allow by plugin a dynamically switch of backend languages driven
by user choise, this wont work anymore (prev 3.0 works!) because the
follwoing file makes a wrong assumption: ''/wp-includes/script-
loader.php''
The questionable function is ''print_admin_styles()'' where the $dir var
will be taken out of a style not proper configured:
{{{
$dir = $wp_styles->text_direction;
}}}
This can be repaired by using the correctly set global locale object:
{{{
global $wp_locale;
$dir = $wp_locale->text_direction;
}}}
afterwards the admin menu is correctly displayed right hand side instead
of left side.
Reproducing the bug is easy: use original US WP version 3.0, download
''he_IL.mo'' and ''he_IL.php'' and change only ''define ('WPLANG',
'he_IL');''
I would expect now the admin menu on right hand side but it's still left
side, what is wrong!
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14129>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list