WordPress at a glance
Главная Functions Localization

Category: Localization 23

__()

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

_e{}

Display translation of specified 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.

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 replaces special characters in it with HTML entities. Displays text that can be used in HTML as HTML code.

get_locale()

Retrieves the current locale.

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

Loads a plugin's translated strings.

load_textdomain()

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

load_theme_textdomain()

Load the theme's translated strings.

number_format_i18n()

Convert float number to format based on the locale.

switch_to_locale()

Switches the translations according to the given locale.

translate()

Retrieve the translation of $text.

unload_textdomain()

Unload translations for a text domain.