WordPress at a glance
function is not described

WP_Locale_Switcher::is_switched() public WP 4.7.0

Whether switch_to_locale() is in effect.

{} It's a method of the class: WP_Locale_Switcher{}

No Hooks.

Return

true/false. True if the locale has been switched, false otherwise.

Usage

$WP_Locale_Switcher = new WP_Locale_Switcher();
$WP_Locale_Switcher->is_switched();

Changelog

Since 4.7.0 Introduced.

Code of WP_Locale_Switcher::is_switched() WP 5.5.1

<?php
public function is_switched() {
	return ! empty( $this->locales );
}