import type { InitI18NextOptions } from "./type"; export declare const initI18next: ({ defaultNS, fallbackLng, fallbackNS, lng, ns, resources, supportedLngs, debug, }: InitI18NextOptions) => Promise; /** * Initializes i18next and returns the i18next instance along with a translation function. * @template T - Namespace type, Pass all allowed Namespace. * @template L - Pass all allowed Language. * @param {L} lng - The language to use. * @param {T} ns - The namespace to use. * @param {InitI18NextOptions} initI18NextOptions - Options for initializing i18next. * @param {{ keyPrefix?: string }} [options] - Additional options. * @param {string} [options.keyPrefix] - Prefix for translation keys. * @returns {Promise<{ i18n: i18next.i18n, t: i18next.TFunction }>} An object containing the i18next instance and the translation function. * @example * export function useServerSideTranslation( ns: AppNameSpacesKey, lng: AppLocales = "fa", options: object & { keyPrefix?: string } = {}, ) { return useTranslation( lng, ns, { defaultNS: APP_NAME_SPACES_KEY.MAIN, fallbackLng: LOCALES.FA, lng: LOCALES.FA, ns: Object.values(APP_NAME_SPACES_KEY), resources: appLocaleResources, fallbackNS: APP_NAME_SPACES_KEY.MAIN, supportedLngs: Object.values(LOCALES), }, options, ); } */ export declare function useTranslation(lng: L, ns: T, initI18NextOptions: InitI18NextOptions, options?: { keyPrefix?: string; }): Promise<{ i18n: import("i18next").i18n; t: import("i18next").TFunction; }>;