WP_Locale_Switcher::get_switched_locale(): string|false

In this article

Returns the locale currently switched to.

Return

string|false Locale if the locale has been switched, false otherwise.

Source

public function get_switched_locale() {
	$entry = end( $this->stack );

	if ( $entry ) {
		return $entry[0];
	}

	return false;
}

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.