Changeset 19755
- Timestamp:
- 01/25/2012 10:41:55 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/locale.php
r19754 r19755 84 84 */ 85 85 var $text_direction = 'ltr'; 86 87 /** 88 * Locales which are known to be right-to-left. 89 */ 90 private $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' ); 86 91 87 92 /** … … 178 183 $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; 179 184 185 // Locale-specific tweaks 186 if ( in_array( get_locale(), $this->rtl_locales ) ) 187 $this->text_direction = 'rtl'; 188 180 189 // Import the $text_direction global. 181 190 if ( isset( $GLOBALS['text_direction'] ) ) 182 191 $this->text_direction = $GLOBALS['text_direction']; 183 184 192 } 185 193 … … 322 330 * @return bool Whether locale is RTL. 323 331 */ 324 function is_rtl() { 325 return 'rtl' == $this->text_direction; 326 } 332 function is_rtl() { 333 return 'rtl' == $this->text_direction; 334 } 335 327 336 } 328 337
Note: See TracChangeset
for help on using the changeset viewer.