KScript docs
EN

locale fields and methods

A field is a plain fact about the value, read with a dot and no brackets: $value.name. A method takes arguments or does work, and is called with ->: $value->name(arguments), or with the value piped in: $value |> name(arguments).

Fields

FieldTypeDescription
.languagestringThe language code: en in en-GB.
.namestringIts name in English: English (United Kingdom).
.native_namestringIts name in its own language: français (France).
.regionstringThe region code: GB in en-GB, or '' when there isn't one.

From KScript.Core

#locale->format(value: any) → string

A number or date written the way this locale writes it: 1.234,5 in de-DE.
ParameterTakes
value requiredany
Example
<let name="x" type="locale" value="'de-DE'" />
<echo>{ $x->format(1234.5) }</echo>
$x: locale = 'de-DE'
echo $x->format(1234.5)

Methods from any

Methods from string