do_action( 'switch_locale', string $locale, false|int $user_id )

Fires when the locale is switched.


Parameters

$locale

The new locale.

$user_id

User ID for context if available.


Source

File: wp-includes/class-wp-locale-switcher.php

View on GitHub



Changelog

Changelog
Version Description
6.2.0 The $user_id parameter was added.
4.7.0 Introduced.