change_locale WordPress Action Hook
The change_locale Wordpress hook enables a plugin to change the current locale. This is useful for creating a multilingual site. The hook is triggered when the user changes the locale in their Wordpress settings.
do_action( 'change_locale', string $locale ) #
Fires when the locale is switched to or restored.
Parameters
- $locale
(string)The new locale.
Source
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |