Core Function
View Source on Trac ↗ switch_to_user_locale()
switch_to_user_locale( mixed $user_id ) Switches the translations according to the given user's locale.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $user_id int | User ID. Required |
Return Value
(bool)
True on success, false on failure.
Function Information
Since Version
6.2.0
Source File
wp-includes/l10n.php
Advertisement