import { IntlShape } from 'react-intl/src/types'; import { Direction } from '../direction'; export declare const DEFAULT_LANG = "en"; export declare const DEFAULT_LOCALE = "en-GB"; /** * Languages written right-to-left. */ export declare const RTL_LANGUAGES: string[]; /** * @deprecated The source of truth for supported languages lives in Crab. */ export declare const SUPPORTED_LANGUAGES: string[]; /** * Verifies and adjusts locale, replacing `_` with `-`. * * @param locale `es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc. * @returns `null` if locale is unrecognized by `Intl.Locale`. */ export declare function adjustLocale(locale: string): string | null; /** * Provides corresponding lang (iso2) for provided locale. * * @deprecated The use of this function almost always breaks language variants * e.g. Simplified and Traditional Chinese. * There should be no use case for this function. * To select the correct translations from a translations object, pass the * locale directly into Crab's getLocalisedMessages. * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc. * @returns Two-letter ISO 639-1 language code, falling back to `null` if locale is invalid or language is unsupported. */ export declare function getLangFromLocale(locale: string): string | null; /** * Provides corresponding country code (iso2) for locales code with explicit region value. * * @param locale `es-ES`, `en-GB`, `ja-JP`, etc. * @returns `null` if the locale is invalid or the region can‘t be identified. */ export declare function getCountryFromLocale(locale: string): string | null; /** * Provides the layout direction for a given locale. * * @param locale `es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP`, etc. * @returns The layout direction based on the locale, falling back to `Direction.LTR` if the locale is invalid or unsupported. */ export declare function getDirectionFromLocale(locale: string): Direction.RTL | Direction.LTR; /** * Provides the localized currency name for a given currency code. * @param intl The `intl` object from `react-intl` used for localization. * @param currencyCode The ISO 4217 currency code (e.g., `USD`, `EUR`, `JPY`). * @returns The localized currency name if Intl.DisplayNames is supported supported, otherwise returns the original currency code. */ export declare function getLocaleCurrencyName(intl: IntlShape, currencyCode: string): string; //# sourceMappingURL=index.d.ts.map