Action hook 'switch_locale'

in WP Core File wp-includes/class-wp-locale-switcher.php at line 98

Description

Fires when the locale is switched.

Occurrences

Filename Line Number
wp-includes/class-wp-locale-switcher.php 98

Parameters

Type Name Description
string $locale The new locale.
false|int $user_id User ID for context if available.

PHP Doc

/**
		 * Fires when the locale is switched.
		 *
		 * @since 4.7.0
		 * @since 6.2.0 The `$user_id` parameter was added.
		 *
		 * @param string    $locale  The new locale.
		 * @param false|int $user_id User ID for context if available.
		 */