Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLangDetectFail = errors.New("could not detect Language") ErrLangFallbackUndefined = errors.New("no fallback language defined") ErrLangFallbackUnsupported = errors.New("defined fallback language is not supported") ErrLangUnsupported = errors.New("language not supported") ErrLangParse = errors.New("language identifier cannot be parsed") )
Functions ¶
func DetectIETF ¶
DetectIETF detects and returns the IETF language tag of UNIX systems, like Linux and macOS. If a territory is defined, the returned value will be in the format of `[language]-[territory]`, e.g. `en-GB`.
func IsError ¶
IsError checks an error you received from one of jibberjabber's funcs for a jibberjabber error like `ErrLangDetectFail`. Reason you cannot use e.g. `errors.Is()`: currently, golang does not allow native chain-wrapping errors. Therefore, `errors.Unwrap()`, `errors.Is()` & Co. won't return `true` for jibberjabber errors.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.