import { DeepTransformContent } from "../plugins.js"; import { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent } from "@intlayer/types/module_augmentation"; import { GetSubPath } from "@intlayer/types/dictionary"; import { ValidDotPathsFor } from "@intlayer/core/transpiler"; /** * Hook that provides a translation function `t()` for accessing nested content by key. * This hook mimics the pattern found in libraries like i18next, next-intl, and vue-i18n. * * @param namespace - The dictionary key to scope translations to * @param locale - Optional locale override. If not provided, uses the current context locale * @returns A translation function `t(key)` that returns the translated content for the given key * * @example * ```tsx * const t = useI18n('IndexPage'); * const title = t('title'); // Returns translated string for 'IndexPage.title' * const nestedContent = t('section.subtitle'); // Returns 'IndexPage.section.subtitle' * // For attributes like `aria-label`, use `.value` to get the plain string * const ariaLabel = t('button.ariaLabel').value; // 'Close modal' * ``` */ export declare const useI18n: (namespace: T, locale?: L) =>

>(path: P) => GetSubPath>, P>; //# sourceMappingURL=useI18n.d.ts.map