go-locale: github.com/Xuanwo/go-locale Index | Files

package locale

import "github.com/Xuanwo/go-locale"


Package Files

error.go locale.go locale_posix.go locale_shared.go


var (
    // ErrNotDetected returns while no locale detected.
    ErrNotDetected = errors.New("not detected")
    // ErrNotSupported means current platform or language is not supported.
    ErrNotSupported = errors.New("not supported")

func Detect Uses

func Detect() (tag language.Tag, err error)

Detect will detect current env's language.

func DetectAll Uses

func DetectAll() (tags []language.Tag, err error)

DetectAll will detect current env's all available language.

type Error Uses

type Error struct {
    Op  string
    Err error

Error is the error returned by locale.

func (*Error) Error Uses

func (e *Error) Error() string

func (*Error) Unwrap Uses

func (e *Error) Unwrap() error

Unwrap implements xerrors.Wrapper

Package locale imports 6 packages (graph) and is imported by 3 packages. Updated 2020-08-04. Refresh now. Tools for package owners.