Home

Awesome

go-locale

Build Status Go Doc Go Ver License Discord

go-locale is a Golang lib for cross-platform locale detection.

OS Support

Support all OS that Golang supported, except android:

POSIX Compatible Systems

Js

Windows

macOS X (darwin)

Usage

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

func main() {
    tag, err := locale.Detect()
    if err != nil {
        log.Fatal(err)
    }
    // Have fun with language.Tag!

    tags, err := locale.DetectAll()
    if err != nil {
        log.Fatal(err)
    }
    // Get all available tags
}

Acknowledgments

Inspired by jibber_jabber