Class: UILang

UILang

This class is the lang of the UI.

new UILang()

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 9
Properties:
Name Type Description
__uiMainContainer UIMainContainer

The main container of the UI.

Example
const lang = new UILang(uiMainContainer);

Methods

emit(eventName, args)

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 88

Emits an event with the provided arguments.

Name Type Description
eventName string

The name of the event.

args any repeatable

Arguments to pass to the event handlers.

getCurrentLang()

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 36

This method allow to get the current lang applied.

Returns:
The current lang.

getEventHandlers(eventName){Array.<function()>}

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 106

Retrieves all event handlers for a given event.

Name Type Description
eventName string

The name of the event.

Returns:
Type Description
Array.<function()> An array of event handlers.

hasEvent(eventName){boolean}

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 97

Checks if an event has any registered handlers.

Name Type Description
eventName string

The name of the event.

Returns:
Type Description
boolean True if the event has handlers, otherwise false.

off(eventName, callback)

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 79

Removes an event handler. If no callback is provided, removes all handlers for the event.

Name Type Description
eventName string optional

The name of the event.

callback function optional

The callback function to remove.

on(eventName, callback)

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 61

Registers an event handler that will be invoked every time the event is emitted.

Name Type Description
eventName string

The name of the event.

callback function

The callback function to handle the event.

once(eventName, callback)

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 70

Registers a one-time event handler that will be invoked only the next time the event is emitted.

Name Type Description
eventName string

The name of the event.

callback function

The callback function to handle the event.

updateLang(){void}

Layers/GoVerticalRemoteSensing/clases/UI/utils/UILang.ts, line 44

Set the lang.

Returns:
Type Description
void Nothing.