Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LanguageServiceInterface

Hierarchy

  • LanguageServiceInterface

Index

Properties

Readonly onLanguageChange

onLanguageChange: Signal<LanguageChangeHandler>

Signal that is emitted when the user interface language has been switched.

Methods

getCurrentDataLanguage

  • Returns the current data language.

    Returns Language

    The language currently being used as the data language.

getCurrentUiLanguage

  • Returns the current user interface language.

    Returns Language

    The language currently being used as the user interface language.

setDataLanguage

  • Change the data language to the language provided.

    Parameters

    • language: DataLanguage

      An enum with the language to switch to.

    Returns void

setLanguage

  • setLanguage(key: string): Promise<void>
  • Switch the current language.

    Note: This changes both the user interface language (used for the default interface) and the data language (used for user-provided names and descriptions). In case the language defined by the language key is not supported, the data language is updated, but not the user interface language.

    If you only want to change the user interface language use the setUiLanguage method. Or, if you only want to change the data language use the setDataLanguage method.

    Parameters

    • key: string

      the two digit ISO-639-1 language key of the language you want to switch to.

    Returns Promise<void>

    Promise which is resolved in case the switch was successful, rejected in case the language isn't supported by the user interface.

setUiLanguage

  • setUiLanguage(language: UiLanguage): Promise<void>
  • Change the user interface language to the language provided.

    Parameters

    • language: UiLanguage

      An enum with the language to switch to.

    Returns Promise<void>

    Promise which is resolved in case the switch was successful, rejected in case the language wasn't supported by the user interface.

Generated using TypeDoc