import { Config } from "../../state"; import { LocalizationType } from "./LocaleManager.definitions"; /** * Locale Manager * @private */ export declare class LocaleManager { private static localeTag; private static availableLocales; private static localesUrl; private static localeSource; /** * initializes Locale Manager by setting the user preferred locale and available locales in Flex UI * @private * @param {Config | undefined} config Flex UI's configuration * @returns {Promise | undefined>} a locale object or undefined */ static init(config: Config): Promise | undefined>; /** * Determines the default locale by first checking the user preferred language, * then the remote/account-level language and finally, the default browser language. * If none are present, it will return en-US * @private * @param {string | undefined} language Account level language * @returns {Promise} Locale tag and locale source */ private static determineLocale; /** * Queries and returns the availableLocales array in Flex UI. * @private * @returns {Promise>} Array of locales */ private static getAvailableLocales; /** * This method aggregates different methods and values associated with localization. * @private * @returns {LocalizationType} Localization instance */ static get localization(): LocalizationType; /** * Gets the URL of locale resources based on the environment: local dev, preview release, or official release * @private * @returns {string} locales URL */ private static getLocalesUrl; /** * This method returns the strings associated with a locale or undefined if is it not available. * @private * @param {Array} availableLocales available locales in Flex UI * @param {string} localeUrl The base locale URL * @param {localeTag} localeTag the locale to fetch * @returns {Promise | undefined>} locale strings object or undefined */ private static getLocaleStrings; }