translate_user_role
translate_user_role ( $name, $domain = 'default' )
Parameters:- (string) name The role name.
- (string) domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
Returns:- (string) Translated role name on success, original name on failure.
Defined at:Change Log: - Introduced in WordPress: 2.8.0
- Deprecated in WordPress: —
Description
Translates role name.Since the role names are in the database and not in the source there
are dummy gettext calls to get them into the POT file and this function
properly translates them back.
The before_last_bar() call is needed, because older installations keep the roles
using the old context format: 'Role name|User role' and just skipping the
content after the last bar is easier than fixing them in the DB. New installations
won't suffer from that problem.