package locale
import "github.com/jeandeaual/go-locale"
Index ¶
- Constants
- func GetLanguage() (string, error)
- func GetLocale() (string, error)
- func GetLocales() ([]string, error)
- func GetRegion() (string, error)
- func SetRunOnJVM(_ func(fn func(vm, env, ctx uintptr) error) error)
Constants ¶
const LocaleNameMaxLength uint32 = 85
LocaleNameMaxLength is the maximum length of a locale name on Windows. See https://docs.microsoft.com/en-us/windows/win32/intl/locale-name-constants.
Functions ¶
func GetLanguage ¶
GetLanguage retrieves the IETF BCP 47 language tag set on the system and returns the language part of the tag.
func GetLocale ¶
GetLocale retrieves the IETF BCP 47 language tag set on the system.
func GetLocales ¶
GetLocales retrieves the IETF BCP 47 language tags set on the system.
func GetRegion ¶
GetRegion retrieves the IETF BCP 47 language tag set on the system and returns the region part of the tag.
func SetRunOnJVM ¶
SetRunOnJVM is a noop, this function is only valid on Android
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
examples | |
examples/getlocale |
- Version
- v0.0.0-20241217141322-fcc2cadd6f08 (latest)
- Published
- Dec 17, 2024
- Platform
- windows/amd64
- Imports
- 4 packages
- Last checked
- now –
Tools for package owners.