WordPress at a glance

is_locale_switched() WP 1.0

Whether switch_to_locale() is in effect.

Возвращает

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

Использование

is_locale_switched();

Заметки

  • Global. WP_Locale_Switcher. $wp_locale_switcher WordPress locale switcher object.

Changelog

Since 4.7.0 Introduced.

Код is_locale_switched() WP 5.5.1

<?php
function is_locale_switched() {
	/* @var WP_Locale_Switcher $wp_locale_switcher */
	global $wp_locale_switcher;

	return $wp_locale_switcher->is_switched();
}

From tag: locale (site language)

More from tag: localize (l10n i18n Internationalization localization)

More from category: Localization

No comments
    Log In . Register