$determined_locale =
apply_filters( 'pre_determine_locale', null
);
if ( $determined_locale &&
is_string( $determined_locale ) ) { return $determined_locale;
} if ( isset( $GLOBALS['pagenow'
] ) && 'wp-login.php' ===
$GLOBALS['pagenow'
] && ( !
empty( $_GET['wp_lang'
] ) || !
empty( $_COOKIE['wp_lang'
] ) ) ) { if ( !
empty( $_GET['wp_lang'
] ) ) { $determined_locale =
sanitize_locale_name( $_GET['wp_lang'
] );
} else { $determined_locale =
sanitize_locale_name( $_COOKIE['wp_lang'
] );
} } elseif ( is_admin() || ( isset( $_GET['_locale'
] ) && 'user' ===
$_GET['_locale'
] &&
wp_is_json_request() ) ) { $determined_locale =
get_user_locale();
} if ( !
$determined_locale ) {