eligius
    Preparing search index...

    Class LanguageManager

    Manages multi-language labels with explicit, testable API.

    This class manages the labels for an IEligiusEngine instance. It provides a pure API for language management and emits events for language changes.

    Eventbus integration is handled by LanguageEventbusAdapter.

    Implements

    Index

    Constructors

    Accessors

    Methods

    • Get multiple label collections by IDs

      Parameters

      • collectionIds: string[]

        Array of label collection IDs

      Returns (ILabel[] | undefined)[]

      Array of label arrays (undefined for not found collections)

    • Subscribe to language manager events

      Type Parameters

      • K extends "change"

      Parameters

      Returns () => void

      Unsubscribe function

    • Change the current language

      Parameters

      • language: `${Lowercase<string>}-${Uppercase<string>}`

        New language code

      Returns void

      If language code is empty or null