Changeset 39122 for trunk/src/wp-admin/options.php
- Timestamp:
- 11/03/2016 05:54:42 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options.php
r38705 r39122 195 195 196 196 if ( $options ) { 197 $user_language_old = get_user_locale(); 198 197 199 foreach ( $options as $option ) { 198 200 if ( $unregistered ) { … … 218 220 } 219 221 220 / / Switch translation in case WPLANG was changed.221 $language = get_option( 'WPLANG' );222 $user_language = get_user_locale();223 if ( $language === $user_language ) {224 if ( $language ) {225 load_default_textdomain( $language);226 } else {227 unload_textdomain( 'default' );228 }222 /* 223 * Switch translation in case WPLANG was changed. 224 * The global $locale is used in get_locale() which is 225 * used as a fallback in get_user_locale(). 226 */ 227 unset( $GLOBALS['locale'] ); 228 $user_language_new = get_user_locale(); 229 if ( $user_language_old !== $user_language_new ) { 230 load_default_textdomain( $user_language_new ); 229 231 } 230 232 }
Note: See TracChangeset
for help on using the changeset viewer.