• Gets a translation given a dictionary, entry, and translation index.

    Type Parameters

    Parameters

    • dictionary: DICT

      The dictionary to get a translation from, for instance, Dictionary.Item.

    • entry: default extends DICT ? string | number : DictionaryEntryEnums[DICT]

      The entry in the given dictionary to get a translation from, for instance, Item.Branch.

    • Optional index: number | "random"

      Optional. The index of the translation in the given dictionary entry, for instance ItemTranslation.Description, or "random" to return any of the translations in this entry.

    Returns default

  • Gets a translation by its translation id. Entry matching is done by changing the case-style of the inputted translation id, so if you provide an all lower-case string it will not work!

    Examples that do work:

    • Ui:MenuMainButtonContinueGame
    • ui:menuMainButtonContinueGame
    • ui:menu-main-button-continue-game
    • Ui:Menu-Main-Button-Continue-Game
    • Player.FirstName:random
    • Creature.AcidSpitterDemon:1

    Examples that don't work:

    • UI:MENU-MAIN-BUTTON-CONTINUE-GAME
    • Ui:menumainbuttoncontinuegame
    • UI:MENUMAINBUTTONCONTINUEGAME

    Parameters

    • translationId: string

    Returns default

Generated using TypeDoc