+/**
+ * Display translated text.
+ *
+ * @since 1.2.0
+ *
+ * @param string $text Text to translate.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ */
+function _e( $text, $domain = 'default' ) {
+ echo translate( $text, $domain );
+}
+
+/**
+ * Display translated text that has been escaped for safe use in an attribute.
+ *
+ * @since 2.8.0
+ *
+ * @param string $text Text to translate.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ */
+function esc_attr_e( $text, $domain = 'default' ) {
+ echo esc_attr( translate( $text, $domain ) );
+}
+
+/**
+ * Display translated text that has been escaped for safe use in HTML output.
+ *
+ * @since 2.8.0
+ *
+ * @param string $text Text to translate.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ */
+function esc_html_e( $text, $domain = 'default' ) {
+ echo esc_html( translate( $text, $domain ) );
+}
+
+/**
+ * Retrieve translated string with gettext context.
+ *
+ * Quite a few times, there will be collisions with similar translatable text
+ * found in more than two places, but with different translated context.
+ *
+ * By including the context in the pot file, translators can translate the two
+ * strings differently.
+ *
+ * @since 2.8.0
+ *
+ * @param string $text Text to translate.
+ * @param string $context Context information for the translators.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ * @return string Translated context string without pipe.
+ */
+function _x( $text, $context, $domain = 'default' ) {
+ return translate_with_gettext_context( $text, $context, $domain );
+}
+
+/**
+ * Display translated string with gettext context.
+ *
+ * @since 3.0.0
+ *
+ * @param string $text Text to translate.
+ * @param string $context Context information for the translators.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ * @return string Translated context string without pipe.
+ */
+function _ex( $text, $context, $domain = 'default' ) {
+ echo _x( $text, $context, $domain );
+}
+
+/**
+ * Translate string with gettext context, and escapes it for safe use in an attribute.
+ *
+ * @since 2.8.0
+ *
+ * @param string $text Text to translate.
+ * @param string $context Context information for the translators.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ * @return string Translated text
+ */
+function esc_attr_x( $text, $context, $domain = 'default' ) {
+ return esc_attr( translate_with_gettext_context( $text, $context, $domain ) );
+}
+
+/**
+ * Translate string with gettext context, and escapes it for safe use in HTML output.
+ *
+ * @since 2.9.0
+ *
+ * @param string $text Text to translate.
+ * @param string $context Context information for the translators.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ * @return string Translated text.
+ */
+function esc_html_x( $text, $context, $domain = 'default' ) {
+ return esc_html( translate_with_gettext_context( $text, $context, $domain ) );
+}
+
+/**
+ * Retrieve the plural or single form based on the supplied amount.
+ *
+ * If the text domain is not set in the $l10n list, then a comparison will be made
+ * and either $plural or $single parameters returned.
+ *
+ * If the text domain does exist, then the parameters $single, $plural, and $number
+ * will first be passed to the text domain's ngettext method. Then it will be passed
+ * to the 'ngettext' filter hook along with the same parameters. The expected
+ * type will be a string.
+ *
+ * @since 2.8.0
+ *
+ * @param string $single The text that will be used if $number is 1.
+ * @param string $plural The text that will be used if $number is not 1.
+ * @param int $number The number to compare against to use either $single or $plural.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ * @return string Either $single or $plural translated text.
+ */
+function _n( $single, $plural, $number, $domain = 'default' ) {
+ $translations = get_translations_for_domain( $domain );
+ $translation = $translations->translate_plural( $single, $plural, $number );
+ /**
+ * Filter text with its translation when plural option is available.
+ *
+ * @since 2.2.0
+ *
+ * @param string $translation Translated text.
+ * @param string $single The text that will be used if $number is 1.
+ * @param string $plural The text that will be used if $number is not 1.
+ * @param string $number The number to compare against to use either $single or $plural.
+ * @param string $domain Text domain. Unique identifier for retrieving translated strings.
+ */
+ return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );
+}
+
+/**
+ * Retrieve the plural or single form based on the supplied amount with gettext context.
+ *
+ * This is a hybrid of _n() and _x(). It supports contexts and plurals.
+ *
+ * @since 2.8.0
+ *
+ * @param string $single The text that will be used if $number is 1.
+ * @param string $plural The text that will be used if $number is not 1.
+ * @param int $number The number to compare against to use either $single or $plural.
+ * @param string $context Context information for the translators.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ * @return string Either $single or $plural translated text with context.
+ */
+function _nx($single, $plural, $number, $context, $domain = 'default') {
+ $translations = get_translations_for_domain( $domain );
+ $translation = $translations->translate_plural( $single, $plural, $number, $context );
+ /**
+ * Filter text with its translation while plural option and context are available.
+ *
+ * @since 2.8.0
+ *
+ * @param string $translation Translated text.
+ * @param string $single The text that will be used if $number is 1.
+ * @param string $plural The text that will be used if $number is not 1.
+ * @param string $number The number to compare against to use either $single or $plural.
+ * @param string $context Context information for the translators.
+ * @param string $domain Text domain. Unique identifier for retrieving translated strings.
+ */
+ return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain );
+}
+
+/**
+ * Register plural strings in POT file, but don't translate them.
+ *
+ * Used when you want to keep structures with translatable plural
+ * strings and use them later.
+ *
+ * Example:
+ * <code>
+ * $messages = array(
+ * 'post' => _n_noop('%s post', '%s posts'),
+ * 'page' => _n_noop('%s pages', '%s pages')
+ * );
+ * ...
+ * $message = $messages[$type];
+ * $usable_text = sprintf( translate_nooped_plural( $message, $count ), $count );
+ * </code>
+ *
+ * @since 2.5.0
+ *
+ * @param string $singular Single form to be i18ned.
+ * @param string $plural Plural form to be i18ned.
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
+ * @return array array($singular, $plural)
+ */
+function _n_noop( $singular, $plural, $domain = null ) {
+ return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null, 'domain' => $domain );
+}
+
+/**
+ * Register plural strings with context in POT file, but don't translate them.
+ *
+ * @since 2.8.0
+ */
+function _nx_noop( $singular, $plural, $context, $domain = null ) {
+ return array( 0 => $singular, 1 => $plural, 2 => $context, 'singular' => $singular, 'plural' => $plural, 'context' => $context, 'domain' => $domain );
+}
+
+/**
+ * Translate the result of _n_noop() or _nx_noop().
+ *
+ * @since 3.1.0
+ *
+ * @param array $nooped_plural Array with singular, plural and context keys, usually the result of _n_noop() or _nx_noop()
+ * @param int $count Number of objects
+ * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings. If $nooped_plural contains
+ * a text domain passed to _n_noop() or _nx_noop(), it will override this value.
+ * @return string Either $single or $plural translated text.
+ */
+function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) {
+ if ( $nooped_plural['domain'] )
+ $domain = $nooped_plural['domain'];
+
+ if ( $nooped_plural['context'] )
+ return _nx( $nooped_plural['singular'], $nooped_plural['plural'], $count, $nooped_plural['context'], $domain );
+ else
+ return _n( $nooped_plural['singular'], $nooped_plural['plural'], $count, $domain );
+}
+
+/**
+ * Load a .mo file into the text domain $domain.
+ *
+ * If the text domain already exists, the translations will be merged. If both
+ * sets have the same string, the translation from the original value will be taken.
+ *
+ * On success, the .mo file will be placed in the $l10n global by $domain
+ * and will be a MO object.
+ *
+ * @since 1.5.0
+ *
+ * @param string $domain Text domain. Unique identifier for retrieving translated strings.
+ * @param string $mofile Path to the .mo file.
+ * @return bool True on success, false on failure.
+ */
+function load_textdomain( $domain, $mofile ) {