Localization (category)

__()

Retrieve translation of the text using a translation file (text domain).

_e()

Display translation of the text using a translation file.

_ex()

Displays translated text (string) with specified context.

_n()

Translates and retrieves the singular or plural form based on the supplied number (1 comment, 2 comments).

_nx()

Retrieves the translation of singular or plural form based on the supplied number, with given context.

_x()

Retrieve translation for the specified text based on the specified context. Uses a translation file.

date_i18n()

Retrieve the date in localized format, based on timestamp.

determine_locale()

Gets the current site locale (site language, ex, en_US) desired for the request.

esc_attr__()

Translates the text using esc_attr().

esc_attr_e()

Display translated text that has been escaped for safe use in an HTML tag attribute.

esc_html__()

Translates specified string and escapes it for safe use in HTML output.

esc_html_e()

Translates specified string and escape/clears it for showing on screen - replaces special characters in it with HTML entities.

get_locale()

Sets the global variable $locale and gets the current site locale (for example, en_US).

get_translations_for_domain()

Return the Translations instance for a text domain.

get_user_locale()

Retrieves the locale of a user.

is_locale_switched()

Whether switch_to_locale() is in effect.

is_textdomain_loaded()

Whether there are translations for the text domain.

load_child_theme_textdomain()

Load the child themes translated strings.

load_muplugin_textdomain()

Load the translated strings for a plugin residing in the mu-plugins directory.

load_plugin_textdomain()

Loads the .mo translation file from the specified folder. Does not work with MU plugins.

load_textdomain()

Load a .mo file into the text domain $domain.

load_theme_textdomain()

Load the theme's translated strings.

sanitize_locale_name()

Strips out all characters not allowed in a locale name.

switch_to_locale()

Allows you to switch the site language programmatically.

translate()

Retrieve the translation of $text.

translate_user_role()

Translates role name.

unload_textdomain()

Unload translations for a text domain.

WP_Locale{}

Core class used to store translated data for a locale.

wp_set_script_translations()

Sets translated strings for a script.