92* @since 4.7.093* @since 6.2.0 The `$user_id` parameter was added.94*95* @param string$locale The newlocale.96* @param false|int$user_id User IDfor context if available.97*/98do_action('switch_locale',$locale,$user_id);99100returntrue;101}102103/**104* Switches the translations according to the given user's locale.
History
Introduced in 4.7.0. Unchanged from 6.7.7 through 7.1.0.