Documentation ¶
Overview ¶
Package gettext provides bindings for GNU Gettext.
Index ¶
- Variables
- func BindTextdomain(domainname string, dirname string) string
- func BindTextdomainCodeset(domainname string, codeset string) string
- func DCGettext(domain string, msgid string, category uint) string
- func DCNGettext(domainname string, msgid string, msgidPlural string, n uint64, category uint) string
- func DGettext(domain string, msgid string) string
- func DNGettext(domainname string, msgid string, msgidPlural string, n uint64) string
- func Gettext(msgid string) string
- func NGettext(msgid string, msgidPlural string, n uint64) string
- func SetLocale(category uint, locale string) string
- func Sprintf(format string, a ...interface{}) string
- func Textdomain(domainname string) string
Constants ¶
This section is empty.
Variables ¶
var ( // LcAll is for all of the locale. LcAll = uint(C.LC_ALL) // LcCollate is for regular expression matching (it determines the meaning of // range expressions and equivalence classes) and string collation. LcCollate = uint(C.LC_COLLATE) // LcCtype is for regular expression matching, character classification, // conversion, case-sensitive comparison, and wide character functions. LcCtype = uint(C.LC_CTYPE) // LcMessages is for localizable natural-language messages. LcMessages = uint(C.LC_MESSAGES) // LcMonetary is for monetary formatting. LcMonetary = uint(C.LC_MONETARY) // LcNumeric is for number formatting (such as the decimal point and the // thousands separator). LcNumeric = uint(C.LC_NUMERIC) // LcTime is for time and date formatting. LcTime = uint(C.LC_TIME) )
var ( LC_ALL = LcAll LC_COLLATE = LcCollate LC_CTYPE = LcCtype LC_MESSAGES = LcMessages LC_MONETARY = LcMonetary LC_NUMERIC = LcNumeric LC_TIME = LcTime )
Deprecated but kept for backwards compatibility.
Functions ¶
func BindTextdomain ¶
BindTextdomain sets the directory containing message catalogs.
func BindTextdomainCodeset ¶
BindTextdomainCodeset sets the output codeset for message catalogs on the given domainname.
func DCGettext ¶
DCGettext is like Gettext(), but looks up the message in the specified domain and category.
func DCNGettext ¶
func DCNGettext(domainname string, msgid string, msgidPlural string, n uint64, category uint) string
DCNGettext is like NGettext(), but looks up the message in the specified domain and category.
func Gettext ¶
Gettext attempts to translate a text string into the user's system language, by looking up the translation in a message catalog.
func NGettext ¶
NGettext attempts to translate a text string into the user's system language, by looking up the appropriate plural form of the translation in a message catalog.
func Textdomain ¶
Textdomain sets or retrieves the current message domain.
Types ¶
This section is empty.