get_user_locale
get_user_locale ( $user = 0 )
Parameters:- (int|WP_User) user User's ID or a WP_User object. Defaults to current user.
Returns:- (string) The locale of the user.
Defined at: - Introduced in WordPress: 4.7.0
- Deprecated in WordPress: —
Description
Retrieves the locale of a user.If the user has a locale set to a non-empty string then it will be
returned. Otherwise it returns the locale of get_locale().