WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/26/2012 08:34:27 PM (9 years ago)
Author:
nacin
Message:

Introduce wp_load_translations_early(), which can be used before the locale is properly loaded in order to translate early error strings. Internationalize setup-config.php -- translators no longer have a reason to modify this file. fixes #18180.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/locale.php

    r19755 r19760  
    8888     * Locales which are known to be right-to-left.
    8989     */
    90     private $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' );
     90    private static $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' );
    9191
    9292    /**
     
    184184
    185185        // Locale-specific tweaks
    186         if ( in_array( get_locale(), $this->rtl_locales ) )
     186        if ( self::is_locale_rtl( get_locale() ) )
    187187            $this->text_direction = 'rtl';
    188188
     
    334334    }
    335335
     336    public static function is_locale_rtl( $locale ) {
     337        return in_array( $locale, self::$rtl_locales );
     338    }
    336339}
    337340
Note: See TracChangeset for help on using the changeset viewer.