Logo GenPRES

Localization Module

Holds the languages of the application and converts a language to a two-letter code or a name, and a two-letter code to a language.

Types

Type Description

Locales

The languages the application supports. A new language also needs a case in toShortCode, toString, languages, tryParse, the client lookup of terms and a column in the Localization sheet.

Functions and values

Function or value Description

languages

Full Usage: languages

Returns: Locales[]
Returns: Locales[]

toShortCode _arg1

Full Usage: toShortCode _arg1

Parameters:
Returns: string

Returns a two-letter ISO 639-1 language code for the locale.

_arg1 : Locales
Returns: string

toString _arg1

Full Usage: toString _arg1

Parameters:
Returns: string

Returns the name of the language in that language, as in the header row of the Localization sheet.

_arg1 : Locales
Returns: string

tryParse s

Full Usage: tryParse s

Parameters:
    s : string

Returns: Locales option

Parses a two-letter language code (en, nl, fr, de, es or it), ignoring case and surrounding white space. Returns None for null and any other text, a language name included. Parses both the GENPRES_LANG setting and the lan url parameter.

s : string
Returns: Locales option

Type something to start searching.