#19924 closed defect (bug) (fixed)
An RTL WPLANG results in RTL even if messages are not loaded
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
Description
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.
Attachments (3)
Change History (10)
#2
@
13 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [19797]:
#3
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Part of [19797] has broken $locale.php
inclusion on Windows. 19924.patch fixes that.
validate_file()
for S:\home\wordpress\trunk/wp-content/languages/ru_RU.php
returns 2.
#6
@
13 years ago
19924.2.diff is a more straightforward solution to these various problems.
Took a crack at my initial line of thought.