Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Language ¶
type Language struct { // BCP47 language tag Tag language.Tag // Normalized string // of BCP47 tag. TagStr string // Human-readable // language name(s). DisplayStr string }
Language models a BCP47 language tag along with helper strings for the tag.
func Parse ¶
Parse parses and nicely formats the input language BCP47 tag, returning a Language with ready-to-use display and tag strings.
func ParseTag ¶
ParseTag parses and nicely formats the input language BCP47 tag, returning a Language with ready-to-use display and tag strings.
func (*Language) MarshalText ¶
MarshalText implements encoding.TextMarshaler{}.
func (*Language) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler{}.
Click to show internal directories.
Click to hide internal directories.