go-locale – github.com/jeandeaual/go-locale Index | Files | Directories

package locale

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

Index

Functions

func GetLanguage

func GetLanguage() (string, error)

GetLanguage retrieves the IETF BCP 47 language tag set on the system and returns the language part of the tag.

func GetLocale

func GetLocale() (string, error)

GetLocale retrieves the IETF BCP 47 language tag set on the system.

func GetLocales

func GetLocales() ([]string, error)

GetLocales retrieves the IETF BCP 47 language tags set on the system.

func GetRegion

func GetRegion() (string, error)

GetRegion retrieves the IETF BCP 47 language tag set on the system and returns the region part of the tag.

func SetRunOnJVM

func SetRunOnJVM(_ func(fn func(vm, env, ctx uintptr) error) error)

SetRunOnJVM is a noop, this function is only valid on Android

Source Files

locale_unix.go util.go

Directories

PathSynopsis
examples
examples/getlocale
Version
v0.0.0-20250421151639-a9d6ed1b3d45 (latest)
Published
Apr 21, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
1 week ago

Tools for package owners.