ComPDFKit Web SDK
    Preparing search index...

    Function setTranslations

    • Adds or overrides translations of a language without a language pack file. The object is deep-merged into the existing translations, so only the keys to change are needed. Keys missing in a language fall back to English.

      Parameters

      • language: string

        The language code.

      • translationObject: Record<string, unknown>

        The translations, keyed like the language pack.

      Returns void

      // Rename the "Save" action in English
      instance.UI.setTranslations('en', { common: { actions: { save: 'Save changes' } } });