switch_locale WordPress Action Hook
The switch_locale Wordpress hook is used to change the locale of a Wordpress site. This can be useful for changing the language of a site, or for creating a multilingual site.
do_action( 'switch_locale', string $locale ) #
Fires when the locale is switched.
Parameters
- $locale
(string)The new locale.
Source
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |