UNPKG

@aws-amplify/core

Version:
51 lines (50 loc) 1.47 kB
import { I18nConfig } from './types'; /** * Export I18n APIs */ export declare class I18n { /** * @static * @method * Configure I18n part * @param {Object} config - Configuration of the I18n */ static configure(config: Record<string, any>): I18nConfig; static getModuleName(): string; /** * @static * @method * Create an instance of I18n for the library */ static createInstance(): void; /** * @static @method * Explicitly setting language * @param {String} lang */ static setLanguage(lang: string): void; /** * @static @method * Get value * @param {String} key * @param {String} defVal - Default value */ static get(key: string, defVal?: string): any; /** * @static * @method * Add vocabularies for one language * @param {String} language - Language of the dictionary * @param {Object} vocabularies - Object that has key-value as dictionary entry */ static putVocabulariesForLanguage(language: string, vocabularies: Record<string, string>): void; /** * @static * @method * Add vocabularies for one language * @param {Object} vocabularies - Object that has language as key, * vocabularies of each language as value */ static putVocabularies(vocabularies: Record<string, Record<string, string>>): void; static checkConfig(): boolean; }