klyn.i18n.Locale.Locale
constructor
public Locale(notnull language as String, notnull country as String = "")
Description

Constructs a new Locale from language and country codes. Unknown codes are retained; formatting data defaults to English when the language has no predefined data. Empty codes designate the root locale.

Parameters
ParameterDescription
languageLanguage code; normalized to lowercase.
countryOptional country code; normalized to uppercase.
Throws
  • NullException if a code is null at runtime.
Example

locale = Locale("FR", "ca")