Skip to main content

Class: Language

Represents a set of utility methods for working with languages.

Constructors

constructor

new Language()

Methods

parseLang

Static parseLang(lang?): LanguageEnum

Parses a language string into its corresponding LanguageEnum value.

Parameters

NameTypeDescription
lang?null | stringThe language string to parse, or null/undefined to default to English.

Returns

LanguageEnum

The LanguageEnum value corresponding to the provided string, or English if the string is invalid or undefined.

Defined in

src/language/language.ts:17