UNPKG

@adyen/kyc-components

Version:

This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.

29 lines (28 loc) 1.09 kB
import type { Translatable, Translations } from './types'; import type { GetTranslationOptions } from './utils'; export declare class Language { private readonly supportedLocales; readonly translations: Translations; /** * @deprecated in favor of the `language` property returned from the * i18n instance from i18next * * @example * ```tsx * const { i18n } = useTranslation('common'); * console.log(`${i18n.language} is the selected language code`); // ex. "en-US" * ``` */ readonly locale: string; constructor({ locale, translations, allowedLocales, }: { locale?: string; translations?: Translations; allowedLocales?: string[]; }); /** * Returns a translated string from a key in the current {@link Language.locale} * @returns Translated string in the user's locale * @deprecated we now have i18next for i18n, check out {@link /src/language/README.md} for more details and examples */ get(translatable: Translatable, translationOptions?: GetTranslationOptions): string; }