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:

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().

Related Functions

get_locale, switch_to_user_locale, determine_locale, get_user_meta, get_user_metavalues

Top Google Results

User discussions

wpseek mobile