Title: is_locale_switched
Published: December 7, 2016
Last modified: May 20, 2026

---

# is_locale_switched(): bool

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#wp--skip-link--target)

Determines whether [switch_to_locale()](https://developer.wordpress.org/reference/functions/switch_to_locale/)
is in effect.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#return)󠁿

 bool True if the locale has been switched, false otherwise.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#source)󠁿

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

    	return $wp_locale_switcher->is_switched();
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/l10n.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/l10n.php#L1980)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/l10n.php#L1980-L1985)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Locale_Switcher::is_switched()](https://developer.wordpress.org/reference/classes/wp_locale_switcher/is_switched/)`wp-includes/class-wp-locale-switcher.php` |

Whether [switch_to_locale()](https://developer.wordpress.org/reference/functions/switch_to_locale/) is in effect.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/is_locale_switched/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.7.0](https://developer.wordpress.org/reference/since/4.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_locale_switched%2F)
before being able to contribute a note or feedback.