|Reported by:||ryan||Owned by:||ryan|
Proposal RTL support through loading of locale-specific CSS. Using "fa" as an example locale, here's the gist.
- wp-includes/languages/fa.php contains some locale specific variables. $text_direction specifies the text direction, either 'ltr' or 'rtl'.
- fa.php, if it exists, is loaded into the $wp_locale singleton. The variables defined in fa.php are turned into instance variables of $wp_locale.
- When loading the front page, we check to see if the theme includes fa.css. If so, we load that css after style.css via a 'wp_head' hook.
- If fa.css does not exist and $wp_locale->text_direction is set to rtl and rtl.css is provided by the theme, load rtl.css.
- For the admin, if the text direction is rtl, load rtl.css from wp-admin. We would ship rtl.css as part of WP. It is loaded after wp-admin.css.
Eventually, fa.php could include other locale-specific settings such as the strings to use when constructing permalinks.
Change History (49)
comment:31 @westi — 8 years ago
- Owner changed from ryan to westi
- Status changed from new to assigned
comment:32 @westi — 8 years ago
- Owner changed from westi to ryan
- Status changed from assigned to new
comment:36 @mani_monaj — 8 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Note: See TracTickets for help on using tickets.