gettext: github.com/gosexy/gettext Index | Files | Directories

package gettext

import "github.com/gosexy/gettext"

Package gettext provides bindings for GNU Gettext.

Index

Package Files

gettext.go

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.

func BindTextdomain Uses

func BindTextdomain(domainname string, dirname string) string

BindTextdomain sets the directory containing message catalogs.

func BindTextdomainCodeset Uses

func BindTextdomainCodeset(domainname string, codeset string) string

BindTextdomainCodeset sets the output codeset for message catalogs on the given domainname.

func DCGettext Uses

func DCGettext(domain string, msgid string, category uint) string

DCGettext is like Gettext(), but looks up the message in the specified domain and category.

func DCNGettext Uses

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 DGettext Uses

func DGettext(domain string, msgid string) string

DGettext is like Gettext(), but looks up the message in the specified domain.

func DNGettext Uses

func DNGettext(domainname string, msgid string, msgidPlural string, n uint64) string

DNGettext is like NGettext(), but looks up the message in the specified domain.

func Gettext Uses

func Gettext(msgid string) string

Gettext attempts to translate a text string into the user's system language, by looking up the translation in a message catalog.

func NGettext Uses

func NGettext(msgid string, msgidPlural string, n uint64) string

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 SetLocale Uses

func SetLocale(category uint, locale string) string

SetLocale sets the program's current locale.

func Sprintf Uses

func Sprintf(format string, a ...interface{}) string

Sprintf is like fmt.Sprintf() but without %!(EXTRA) errors.

func Textdomain Uses

func Textdomain(domainname string) string

Textdomain sets or retrieves the current message domain.

Directories

PathSynopsis
_examples
go-xgettext

Package gettext imports 4 packages (graph) and is imported by 48 packages. Updated 2017-12-14. Refresh now. Tools for package owners.