UNPKG

react-intlayer

Version:

Easily internationalize i18n your React applications with type-safe multilingual content management.

13 lines 749 B
import type { LocalesValues } from '@intlayer/config/client'; import type { DictionaryKeys } from '@intlayer/core'; import type { IntlayerDictionaryTypesConnector } from 'intlayer'; import type { DeepTransformContent } from '../plugins'; /** * On the client side, Hook that picking one dictionary by its key and return the content * * If the locale is not provided, it will use the locale from the client context * * When you need the raw string for attributes like `aria-label`, access the `.value` property of the returned content */ export declare const useIntlayer: <T extends DictionaryKeys>(key: T, locale?: LocalesValues) => DeepTransformContent<IntlayerDictionaryTypesConnector[T]["content"]>; //# sourceMappingURL=useIntlayer.d.ts.map