Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Matcher will return the first supported language from the give language tags. Matcher = language.NewMatcher([]language.Tag{language.English, language.Norwegian}) )
Functions ¶
func SetDefaultLocale ¶
SetDefaltLocale sets the defaul locale. It will panic if the given tag is not among locales. It is not safe for concurrent use, and should be set once at program startup.
Types ¶
type Localizer ¶
func GetFromAcceptLang ¶
GetFromAccept lang returns a Localizer parsed from the given Accept-language header string.
Click to show internal directories.
Click to hide internal directories.