/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ import { RuntimeConfiguration } from '@lit/localize'; export { updateWhenLocaleChanges } from '@lit/localize'; export { msg } from '@lit/localize/init/install.js'; export { str } from '@lit/localize'; type Dictionary = Record; type MsgImpl = ((payload: string, dictionary: Dictionary) => string) & { _LIT_LOCALIZE_MSG_: never; }; export declare const msgImpl: MsgImpl; /** * Set configuration parameters for lit-localize when in runtime mode. Returns * an object with functions: * * - `getLocale`: Return the active locale code. * - `setLocale`: Set the active locale code. * * Throws if called more than once. */ export declare const configureLocalization: ((config: RuntimeConfiguration) => { getLocale: typeof getLocale; setLocale: typeof setLocale; }) & { _LIT_LOCALIZE_CONFIGURE_LOCALIZATION_?: never; }; /** * Return the active locale code. */ declare const getLocale: (() => string) & { _LIT_LOCALIZE_GET_LOCALE_?: never; }; /** * Set the active locale code, and begin loading templates for that locale using * the `loadLocale` function that was passed to `configureLocalization`. Returns * a promise that resolves when the next locale is ready to be rendered. * * Note that if a second call to `setLocale` is made while the first requested * locale is still loading, then the second call takes precedence, and the * promise returned from the first call will resolve when second locale is * ready. If you need to know whether a particular locale was loaded, check * `getLocale` after the promise resolves. * * Throws if the given locale is not contained by the configured `sourceLocale` * or `targetLocales`. */ declare const setLocale: ((newLocale: string) => Promise) & { _LIT_LOCALIZE_SET_LOCALE_?: never; };