WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/12/2020 02:41:19 PM (15 months ago)
Author:
ocean90
Message:

I18N: Revert [49236] for now to investigate alternative implementations.

See #39210, #51678, #26511.

File:
1 edited

Legend:

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

    r49236 r49566  
    197197
    198198        foreach ( $domains as $domain ) {
    199             // The default text domain is handled by `load_default_textdomain()`.
    200199            if ( 'default' === $domain ) {
    201200                continue;
    202201            }
    203202
    204             unload_textdomain( $domain, true );
     203            unload_textdomain( $domain );
    205204            get_translations_for_domain( $domain );
    206205        }
     
    220219     */
    221220    private function change_locale( $locale ) {
    222         global $wp_locale;
     221        // Reset translation availability information.
     222        _get_path_to_translation( null, true );
    223223
    224224        $this->load_translations( $locale );
    225225
    226         $wp_locale = new WP_Locale();
     226        $GLOBALS['wp_locale'] = new WP_Locale();
    227227
    228228        /**
Note: See TracChangeset for help on using the changeset viewer.