UNPKG

@shopify/polaris

Version:

Shopify’s admin product component library

14 lines (13 loc) 627 B
interface TranslationDictionary { [key: string]: string | TranslationDictionary; } export declare class I18n { private translation; /** * @param translation A locale object or array of locale objects that overrides default translations. If specifying an array then your desired language dictionary should come first, followed by your fallback language dictionaries */ constructor(translation: TranslationDictionary | TranslationDictionary[]); translate(id: string, replacements?: Record<string, string | number>): string; translationKeyExists(path: string): boolean; } export {};