A WordPress-centric search engine for devs and theme authors



wp-includes/l10n.php ›

Functions44
Core Translation API


Function Short description
before_last_barRemove last item on a pipe-delimited string.
determine_localeDetermine the current locale desired for the request.
esc_attr_eDisplay translated text that has been escaped for safe use in an attribute.
esc_attr_xTranslate string with gettext context, and escapes it for safe use in an attribute.
esc_attr__Retrieve the translation of $text and escapes it for safe use in an attribute.
esc_html_eDisplay translated text that has been escaped for safe use in HTML output.
esc_html_xTranslate string with gettext context, and escapes it for safe use in HTML output.
esc_html__Retrieve the translation of $text and escapes it for safe use in HTML output.
get_available_languagesGet all available languages based on the presence of *.mo files in a given directory.
get_localeRetrieves the current locale.
get_translations_for_domainReturn the Translations instance for a text domain.
get_user_localeRetrieves the locale of a user.
is_locale_switchedWhether switch_to_locale() is in effect.
is_rtlDetermines whether the current locale is right-to-left (RTL).
is_textdomain_loadedWhether there are translations for the text domain.
load_child_theme_textdomainLoad the child themes translated strings.
load_default_textdomainLoad default translated strings based on locale.
load_muplugin_textdomainLoad the translated strings for a plugin residing in the mu-plugins directory.
load_plugin_textdomainLoads a plugin's translated strings.
load_script_textdomainLoad the script translated strings.
load_textdomainLoad a .mo file into the text domain $domain.
load_theme_textdomainLoad the theme's translated strings.
restore_current_localeRestores the translations according to the original locale.
restore_previous_localeRestores the translations according to the previous locale.
switch_to_localeSwitches the translations according to the given locale.
translateRetrieve the translation of $text.
translate_nooped_pluralTranslates and retrieves the singular or plural form of a string that's been registered with _n_noop() or _nx_noop().
translate_user_roleTranslates role name.
translate_with_gettext_contextRetrieve the translation of $text in the context defined in $context.
unload_textdomainUnload translations for a text domain.
wp_dropdown_languagesLanguage selector.
wp_get_installed_translationsGet installed translations.
wp_get_pomo_file_dataExtract headers from a PO file.
_eDisplay translated text.
_exDisplay translated string with gettext context.
_get_path_to_translationGets the path to a translation file for loading a textdomain just in time.
_get_path_to_translation_from_lang_dirGets the path to a translation file in the languages directory for the current locale.
_load_textdomain_just_in_timeLoads plugin and theme textdomains just-in-time.
_nTranslates and retrieves the singular or plural form based on the supplied number.
_nxTranslates and retrieves the singular or plural form based on the supplied number, with gettext context.
_nx_noopRegisters plural strings with gettext context in POT file, but does not translate them.
_n_noopRegisters plural strings in POT file, but does not translate them.
_xRetrieve translated string with gettext context.
__Retrieve the translation of $text.