[wp-trac] [WordPress Trac] #19924: An RTL WPLANG results in RTL even if messages are not loaded
WordPress Trac
wp-trac at lists.automattic.com
Mon Jan 30 01:28:43 UTC 2012
#19924: An RTL WPLANG results in RTL even if messages are not loaded
--------------------------+-----------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.4
Component: I18N | Version:
Severity: normal | Keywords:
--------------------------+-----------------
`define( 'WPLANG', 'he_IL' );` in wp-config.php results in get_locale()
returning 'he_IL', and he_IL.mo will attempt to be loaded, as will
he_IL.php.
he_IL.php previously set `$text_direction = 'rtl';` It is a reasonable
assumption that if he_IL.php is installed in WP_LANG_DIR, then so is
he_IL.mo.
The new RTL detection code introduced in #19600 acts without the need for
he_IL.php.
While I would consider it an incorrect configuration to have WPLANG =
he_IL, I imagine there are some installations out there with an RTL WPLANG
but no language files to trigger it. Normally, this would result in an
English interface, but now, this would result in an English interface in
RTL mode.
Maybe this is more edge than I am anticipating, but perhaps an
is_readable() check of the $locale.mo file would make sense before
trusting WP_Locale::is_locale_rtl().
We could give load_default_textdomain() a return value of its first
load_textdomain() call, and then decide to not even load the $locale.php
file or trigger an RTL switch.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19924>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list