get_user_locale


get_user_locale ( $user_id = 0 )

Parameters:
  • (int|WP_User) $user_id 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, get_user_meta, get_user_metavalues, determine_locale, get_user_to_edit

Top Google Results

User discussions

wpseek mobile