Documentation ¶
Overview ¶
Package i18n provides internalization and localization via middleware. See _examples/miscellaneous/i18n
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Translate ¶
Translate returns the translated word from a context the second parameter is the key of the world or line inside the .ini file the third parameter is the '%s' of the world or line inside the .ini file
func TranslatedMap ¶
TranslatedMap returns translated map[string]interface{} from i18n structure.
Types ¶
type Config ¶
type Config struct { // Default set it if you want a default language // // Checked: Configuration state, not at runtime Default string // URLParameter is the name of the url parameter which the language can be indentified // // Checked: Serving state, runtime URLParameter string // Languages is a map[string]string which the key is the language i81n and the value is the file location // // Example of key is: 'en-US' // Example of value is: './locales/en-US.ini' Languages map[string]string }
Config the i18n options
Click to show internal directories.
Click to hide internal directories.