Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/meshLanguages"

Index

Variables

actLang

actLang: string

initialized

initialized: boolean

langCache

langCache: object

Cache object, where the language JSONs will be stored.

type

{{}}

Type declaration

  • [key: string]: any

Functions

getActiveLanguage

  • Get the active language form the MeshRequest.

    Parameters

    Returns string

    The current language or default language if none is set.

getLanguageArray

  • Get the language array sorted for language fallback with the Mesh backend.

    Parameters

    Returns Array<string>

    The language array, where the current language is the first element.

readLanguageFiles

  • Read the language files from the configured language folder and populate the langCache object.

    Parameters

    Returns void

setActiveLanguage

  • Set the active language.

    Parameters

    • req: IMeshRequest

      The MeshRequest

    • lang: string

      The language code, that should be set as the current language.

    Returns void

translateFilter

  • translateFilter(input: string): any
  • translateFilter(input: string, language: string): any
  • Template filter to translate strings. The language will be chosen from previous requests.

    Parameters

    • input: string

      String that should be translated.

    Returns any

    Translated string or string if no translation is defined.

  • Template filter to translate strings.

    Parameters

    • input: string

      String that should be translated.

    • language: string

      The language to translate to.

    Returns any

    Translated string or string if no translation is defined.

Generated using TypeDoc