locale

package
v0.0.0-...-17244d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentCodeset = 1 << iota
	ComponentTerritory
	ComponentModifier
)

Variables

This section is empty.

Functions

func GetLanguageNames

func GetLanguageNames() []string

func GetLocaleVariants

func GetLocaleVariants(locale string) (variants []string)

* Compute all interesting variants for a given locale name - * by stripping off different components of the value. * * For simplicity, we assume that the locale is in * X/Open format: language[_territory][.codeset][@modifier]

Types

type Components

type Components struct {
	Language  string
	Territory string
	Codeset   string
	Modifier  string
	Mask      uint
}

func ExplodeLocale

func ExplodeLocale(locale string) *Components

ExplodeLocale Break an X/Open style locale specification into components

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL