diff --git a/wp-includes/locale.php b/wp-includes/locale.php index aea9b4c3b..925e241f9 100644 --- a/wp-includes/locale.php +++ b/wp-includes/locale.php @@ -187,13 +187,11 @@ class WP_Locale { $trans = __('number_format_decimal_point'); $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; - // Locale-specific tweaks - if ( self::is_locale_rtl( get_locale() ) ) - $this->text_direction = 'rtl'; - - // Import the $text_direction global. + // Set text direction. if ( isset( $GLOBALS['text_direction'] ) ) $this->text_direction = $GLOBALS['text_direction']; + elseif ( is_textdomain_loaded( 'default' ) && self::is_locale_rtl( get_locale() ) ) + $this->text_direction = 'rtl'; } /** diff --git a/wp-settings.php b/wp-settings.php index 39f98b260..304003042 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -260,12 +260,11 @@ wp_templating_constants( ); // Load the default text localization domain. load_default_textdomain(); -// Find the blog locale. $locale = get_locale(); $locale_file = WP_LANG_DIR . "/$locale.php"; -if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) +if ( ( 0 === validate_file( $locale_file ) ) && is_readable( $locale_file ) ) require( $locale_file ); -unset($locale_file); +unset( $locale_file ); // Pull in locale data after loading text domain. require_once( ABSPATH . WPINC . '/locale.php' );