Language Module
Functions for creating, validating, and extracting data from Language values.
Functions and values
| Function or value |
Description
|
Full Usage:
parse s
Parameters:
string
-
A BCP 47 language tag. The primary subtag must be 2-3 lowercase letters
or the special grandfathered prefix "i". Optional subtags are separated
by hyphens and must be alphanumeric. Trailing hyphens are not allowed.
Returns: Result<Language, string>
Ok with a validated Language, or Error with a message describing the validation failure.
Validation failures include: null input or invalid language tag syntax.
|
Parse and validate a BCP 47 language tag string.
|
Full Usage:
value arg1
Parameters:
Language
Returns: string
The BCP 47 language tag string (e.g. "en" or "pt-BR").
|
Extract the string representation of a language tag.
|