/** @type {import('i18next').ThirdPartyModule} */ export const initLitI18n: import('i18next').ThirdPartyModule; export function setI18n(i18nextInstance: import('i18next').i18n): void; /** * Used to keep track of Parts that need to be updated should the language change. * @type {Map} */ export const registry: Map; export function registryCleanup(): void; /** * The translate directive * @example * ```js * import { translate as t, i18next, html, render } from 'lit-i18n/src/lit-i18n.js'; * i18next.init({...i18next config...}); * class MyElement extends HTMLElement { * connectedCallback() { * this.person = { name: 'Fred', age: 23, male: true }; * render(this.renderTemplate, this); * } * get renderTemplate() { * return html` * ${t('introduceself', { name: this.person.name })} *
Div with translated title
*
* ${t('datamodel', { person: this.person })} * * `; * } * } * ``` */ export const translate: (keys?: string | string[], options?: any) => import("lit-html/directive.js").DirectiveResult; /** * @deprecated as of 4.0.0 use `translate` which already guarantees i18next is initialized * Can be used like translate but it also takes a Promise. This can be used if you can't guarantee if the i18next resource bundle is loaded. * @example * ```js * import { translateWhen } from 'lit-i18n/src/lit-i18n.js'; * const initializeI18next = i18next.use(someBackend).init(....); * const translateDirective = (keys, options) => translateWhen(initializeI18next, keys, options); * // Now you can use translateDirective in your lit-html templates. * html`
${translateDirective('some.key')}
` * ``` */ export const translateWhen: (promise?: Promise, keys?: string | string[], options?: any) => import("lit-html/directive.js").DirectiveResult; /** */ declare class TranslateBase extends AsyncDirective { /** @abstract */ render(): void; value: string; /** @type {import('lit-html/directive.js').PartInfo} */ part: import('lit-html/directive.js').PartInfo; /** * @param {string | string[]} [keys] - translation key * @param {?any} [options] - i18next translation options * @returns {string|Symbol} translated string */ translate(keys?: string | string[], options?: any | null): string | Symbol; } /** */ declare class Translate extends TranslateBase { /** * @param {string | string[]} [keys] - translation key * @param {any} [options] - i18next translation options * @returns {string|Symbol} translated string */ render(keys?: string | string[], options?: any): string | Symbol; } /** */ declare class TranslateWhen extends TranslateBase { /** * @param {Promise} [promise] to wait for * @param {string | string[]} [keys] - translation key * @param {any} [options] - i18next translation options * @returns {string|Symbol} translated string */ render(promise?: Promise, keys?: string | string[], options?: any): string | Symbol; } import { AsyncDirective } from 'lit-html/async-directive.js'; export {};