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-20241217141322-fcc2cadd6f08 (latest)
Published
Dec 17, 2024
Platform
linux/amd64
Imports
2 packages
Last checked
1 day ago

Tools for package owners.