Header menu logo FSharp.ATProto

Language Module

Functions for creating, validating, and extracting data from Language values.

Functions and values

Function or value Description

parse s

Full Usage: parse s

Parameters:
    s : 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.

s : 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.

value arg1

Full Usage: value arg1

Parameters:
Returns: string The BCP 47 language tag string (e.g. "en" or "pt-BR").

Extract the string representation of a language tag.

arg0 : Language
Returns: string

The BCP 47 language tag string (e.g. "en" or "pt-BR").

Type something to start searching.