gettext

package
v0.0.0-...-dddda54 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: GPL-3.0 Imports: 4 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LcAll is for all of the locale.
	LcAll = int(C.LC_ALL)

	// LcCollate is for regular expression matching (it determines the meaning of
	// range expressions and equivalence classes) and string collation.
	LcCollate = int(C.LC_COLLATE)

	// LcCtype is for regular expression matching, character classification,
	// conversion, case-sensitive comparison, and wide character functions.
	LcCtype = int(C.LC_CTYPE)

	// LcMessages is for localizable natural-language messages.
	LcMessages = int(C.LC_MESSAGES)

	// LcMonetary is for monetary formatting.
	LcMonetary = int(C.LC_MONETARY)

	// LcNumeric is for number formatting (such as the decimal point and the
	// thousands separator).
	LcNumeric = int(C.LC_NUMERIC)

	// LcTime is for time and date formatting.
	LcTime = int(C.LC_TIME)
)

Functions

func BindTextdomainCodeset

func BindTextdomainCodeset(domain, codeset string) string

func Bindtextdomain

func Bindtextdomain(domain, dirname string) string

func DGettext

func DGettext(domain, id string) string

func DNGettext

func DNGettext(domain, msgid, plural string, n int) string

func InitI18n

func InitI18n()

func NTr

func NTr(msgid, plural string, n int) string

func QueryLang

func QueryLang() string

QueryLang return user lang. the rule is document at man gettext(3)

func QueryLangs

func QueryLangs() []string

QueryLangs return array of user lang, split by ":". the rule is document at man gettext(3)

func SetLocale

func SetLocale(category int, locale string) string

func Textdomain

func Textdomain(domain string)

func Tr

func Tr(id string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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