Skip to main content

Lang

Manages texts translated into different languages.


code​


_lang.code() : string​

Description​

Returns all the locale.

Return​

( string )


get​


_lang.get(key: string) : string​

Description​

Searchs for a key.

Attributes​
NAMETYPEDESCRIPTION
keystringKey to be searched.
Return​

( string )

Returns the match key.


_lang.get(key: string, formats: java.lang.Object[]) : string​

Attributes​
NAMETYPEDESCRIPTION
keystring
formatsjava.lang.Object[]
Return​

( string )


getCode​


_lang.getCode() : string​

Description​

Returns all the locale.

Return​

( string )


getCountry​


_lang.getCountry() : string​

Return​

( string )


getLanguage​


_lang.getLanguage() : string​

Return​

( string )


getLocale​


_lang.getLocale() : java.util.Locale​

Description​

Returns the of the locale.

Return​

( java.util.Locale )


getName​


_lang.getName() : string​

Description​

Returns the of the locale.

Return​

( string )


getOrDefault​


_lang.getOrDefault(key: string, text: string) : string​

Description​

Sets the default locale key with a inserted text.

Attributes​
NAMETYPEDESCRIPTION
keystringInserted key.
textstringInserted text.
Return​

( string )

Returns the key and the text inserted.


init​


_lang.init() : Lang​

Description​

Initiates the Lang resource.

Return​

( Lang )

Returns the default lang.


_lang.init(localeName: string) : Lang​

Description​

Sets the default locale key with a inserted text.

Attributes​
NAMETYPEDESCRIPTION
localeNamestringInserted key.
Return​

( Lang )

Returns the key and the text inserted.


_lang.init(localeName: string, asDefault: boolean) : Lang​

Description​

Sets the default locale key with a inserted text.

Attributes​
NAMETYPEDESCRIPTION
localeNamestringInserted key.
asDefaultbooleanSets if is default.
Return​

( Lang )

Returns the key and the text inserted.


locale​


_lang.locale() : java.util.Locale​

Description​

Returns the of the locale.

Return​

( java.util.Locale )


name​


_lang.name() : string​

Description​

Returns the of the locale.

Return​

( string )