ComPDFKit Web SDK
    Preparing search index...

    Function getLocalizedText

    • Gets the translation of a key in the current language (this instance's i18next t); returns the key when there is no translation. An optional second argument (i18next options such as interpolation) is passed to t as is. Keys are this package's language pack keys.

      Parameters

      • key: string | string[]

        The language key, or several keys to try in order.

      • Optionaloptions: Record<string, unknown>

        i18next options.

      Returns string

      The translated text. *

      const label = instance.UI.getLocalizedText('common.actions.save'); // 'Save' in English