export declare const localeContext: import("react").Context; interface Props { localeSlug: string; children: React.ReactNode; } export declare const LocaleProvider: React.FC; /** * Get the lang from the @wordpress/i18n locale data and map the value to the locale slug * @returns lang e.g. "en", "pt-br", "zh-tw" */ export declare function getWpI18nLocaleSlug(): string | undefined; /** * React hook providing the current locale slug. If `` hasn't * been defined in the component tree then it will fall back to using the * data from `@wordpress/i18n` to determine the current locale slug. * @example * * import { useLocale } from '@automattic/i18n-utils'; * function MyComponent() { * const locale = useLocale(); * return
The current locale is: { locale }
; * } */ export declare function useLocale(): string; /** * HoC providing the current locale slug supplied to ``. * @param InnerComponent Component that will receive `locale` as a prop * @returns Component enhanced with locale * @example * * import { withLocale } from '@automattic/i18n-utils'; * function MyComponent( { locale } ) { * return
The current locale is: { locale }
; * } * export default withLocale( MyComponent ); */ export declare const withLocale: (Inner: import("react").ComponentType) => (props: OuterProps) => import("react").JSX.Element; /** * React hook providing whether the current locale slug belongs to English or not * @example * * import { useIsEnglishLocale } from '@automattic/i18n-utils'; * function MyComponent() { * const isEnglishLocale = useIsEnglishLocale(); * return
The current locale is English: { isEnglishLocale }
; * } */ export declare function useIsEnglishLocale(): boolean; type HasTranslation = (single: string, context?: string, domain?: string) => boolean; export declare function useHasEnTranslation(): HasTranslation; export {}; //# sourceMappingURL=locale-context.d.ts.map