ITranslationFunction: (key: string, language: string) => string

The translation function is called to retrieve translation for keys.

Type declaration

    • (key: string, language: string): string
    • Parameters

      • key: string

        the key for which a translation should be returned; Note that his is not the English string, but a identifier that can also be prefixed with a namespace (we follow the convention of the npm package i18next here). Examples:

        • namespace1:key1
        • anothernamespace:a-somewhat-longer-key
      • language: string

        the language code to translate to (ISO 639-1)

      Returns string

      the translated string