diff --git a/wp-includes/class-wp-locale-switcher.php b/wp-includes/class-wp-locale-switcher.php
index 8a9bbc3903..9f2893d35e 100644
a
|
b
|
class WP_Locale_Switcher { |
189 | 189 | * @param string $locale The locale to load translations for. |
190 | 190 | */ |
191 | 191 | private function load_translations( $locale ) { |
192 | | global $l10n; |
| 192 | global $l10n, $wp_textdomain_registry; |
193 | 193 | |
194 | 194 | $domains = $l10n ? array_keys( $l10n ) : array(); |
195 | 195 | |
196 | 196 | load_default_textdomain( $locale ); |
| 197 | $wp_textdomain_registry->reset(); |
197 | 198 | |
198 | 199 | foreach ( $domains as $domain ) { |
199 | 200 | // The default text domain is handled by `load_default_textdomain()`. |
diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php
index 6bca550e98..af647c0f52 100644
a
|
b
|
function load_textdomain( $domain, $mofile ) { |
740 | 740 | $mofile = apply_filters( 'load_textdomain_mofile', $mofile, $domain ); |
741 | 741 | |
742 | 742 | if ( ! is_readable( $mofile ) ) { |
| 743 | $wp_textdomain_registry->set( $domain, false ); |
743 | 744 | return false; |
744 | 745 | } |
745 | 746 | |