Documentation
¶
Overview ¶
Package i18n provides internationalization support for applications.
Index ¶
Constants ¶
View Source
const (
// Extension is the file name extension required on localization files.
Extension = ".i18n"
)
Variables ¶
View Source
var ( // Dir is the directory to scan for localization files. This will occur only once, the first time a call to Text() // is made. If you do not set this prior to the first call, a directory in the same location as the executable with // "_i18n" appended to the executable name (sans any extension) will be used. Dir string // Language is the language that should be used for text returned from calls to Text(). It is initialized to the // result of calling Locale(). You may set this at runtime, forcing a particular language for all subsequent calls // to Text(). Language = Locale() // Languages is a slice of languages to fall back to should the one specified in the Language variable not be // available. It is initialized to the value of the LANGUAGE environment variable. Languages = strings.Split(os.Getenv("LANGUAGE"), ":") // Log is set to discard by default. Log logadapter.ErrorLogger = &logadapter.Discarder{} )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.