import { LocaleData, SubscribeCallback, TransformedText, UnsubscribeCallback } from './types'; declare const i18n: import("./types").I18n; /** * Default, singleton instance of `I18n`. */ export default i18n; /** * Returns locale data by domain in a Jed-formatted JSON object shape. * * @see http://messageformat.github.io/Jed/ * * @param { string | undefined } [domain] Domain for which to get the data. * @return { LocaleData } Locale data. */ export declare const getLocaleData: (domain?: string | undefined) => LocaleData; /** * Merges locale data into the Tannin instance by domain. Accepts data in a * Jed-formatted JSON object shape. * * @see http://messageformat.github.io/Jed/ * * @param {LocaleData } [data] Locale data configuration. * @param {string | undefined} [domain] Domain for which configuration applies. */ export declare const setLocaleData: (data?: LocaleData | undefined, domain?: string | undefined) => void; /** * Resets all current Tannin instance locale data and sets the specified * locale data for the domain. Accepts data in a Jed-formatted JSON object shape. * * @see http://messageformat.github.io/Jed/ * * @param {LocaleData} [data] Locale data configuration. * @param {string | undefined} [domain] Domain for which configuration applies. */ export declare const resetLocaleData: (data?: LocaleData | undefined, domain?: string | undefined) => void; /** * Subscribes to changes of locale data * * @param {SubscribeCallback} callback Subscription callback * @return {UnsubscribeCallback} Unsubscribe callback */ export declare const subscribe: (callback: SubscribeCallback) => UnsubscribeCallback; /** * Retrieve the translation of text. * * @see https://developer.wordpress.org/reference/functions/__/ * * @template {string} Text * * @param {Text} text Text to translate. * @param {string | undefined} domain Domain to retrieve the translated text. * * @return {TransformedText} Translated text. */ export declare const __: (text: Text, domain?: string | undefined) => TransformedText; /** * Retrieve translated string with gettext context. * * @see https://developer.wordpress.org/reference/functions/_x/ * * @template {string} Text * * @param {Text} text Text to translate. * @param {string} context Context information for the translators. * @param {string | undefined} domain Domain to retrieve the translated text. * * @return {TransformedText} Translated context string without pipe. */ export declare const _x: (text: Text, context: string, domain?: string | undefined) => TransformedText; /** * Translates and retrieves the singular or plural form based on the supplied * number. * * @see https://developer.wordpress.org/reference/functions/_n/ * * @template {string} Single * @template {string} Plural * * @param {Single} single The text to be used if the number is singular. * @param {Plural} plural The text to be used if the number is plural. * @param {number} number The number to compare against to use either the * singular or plural form. * @param {string | undefined} domain Domain to retrieve the translated text. * * @return {TransformedText} The translated singular or plural form. */ export declare const _n: (single: Single, plural: Plural, number: number, domain?: string | undefined) => TransformedText; /** * Translates and retrieves the singular or plural form based on the supplied * number, with gettext context. * * @see https://developer.wordpress.org/reference/functions/_nx/ * * @template {string} Single * @template {string} Plural * @param {Single} single The text to be used if the number is singular. * * @param {Single} single The text to be used if the number is singular. * @param {Plural} plural The text to be used if the number is plural. * @param {number} number The number to compare against to use either the * singular or plural form. * @param {string} context Context information for the translators. * @param {string | undefined} [domain] Domain to retrieve the translated text. * * @return {TransformedText} The translated singular or plural form. */ export declare const _nx: (single: Single, plural: Plural, number: number, context: string, domain?: string | undefined) => TransformedText; /** * Check if current locale is RTL. * * **RTL (Right To Left)** is a locale property indicating that text is written from right to left. * For example, the `he` locale (for Hebrew) specifies right-to-left. Arabic (ar) is another common * language written RTL. The opposite of RTL, LTR (Left To Right) is used in other languages, * including English (`en`, `en-US`, `en-GB`, etc.), Spanish (`es`), and French (`fr`). * * @return {boolean} Whether locale is RTL. */ export declare const isRTL: () => boolean; /** * Check if there is a translation for a given string (in singular form). * * @param {string} single Singular form of the string to look up. * @param {string} context Context information for the translators. * @param {string} domain Domain to retrieve the translated text. * * @return {boolean} Whether the translation exists or not. */ export declare const hasTranslation: (single: string, context?: string, domain?: string | undefined) => boolean; //# sourceMappingURL=default-i18n.d.ts.map