Documentation ¶
Overview ¶
Package locale parses locale strings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locale ¶
Locale is a language and a geographic region (e.g. en-US, en-GB).
func New ¶
New searches s for a valid language tag (RFC 5646) of the form xx-YY or xx_YY where xx is a 2 character language code and YY is a 2 character country code.
It returns an error if s doesn't contain exactly one language tag or if the language represented by the tag is not supported by this package.
Click to show internal directories.
Click to hide internal directories.