Documentation ¶
Overview ¶
Package i18n is a middleware that provides app Internationalization and Localization of Macross.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // Suburl of path. Default is empty. SubURL string // Directory to load locale files. Default is "conf/locale" Directory string // File stores actual data of locale files. Used for in-memory purpose. Files map[string][]byte // Custom directory to overload locale files. Default is "custom/conf/locale" CustomDirectory string // Langauges that will be supported, order is meaningful. Langs []string // Human friendly names corresponding to Langs list. Names []string // Default language locale, leave empty to remain unset. DefaultLang string // Locale file naming style. Default is "locale_%s.ini". Format string // Name of language parameter name in URL. Default is "lang". Parameter string // Redirect when user uses get parameter to specify language. Redirect bool // Name that maps into template variable. Default is "i18n". TmplName string // Configuration section name. Default is "i18n". Section string }
Options represents a struct for specifying configuration options for the i18n middleware.
Click to show internal directories.
Click to hide internal directories.