Documentation
¶
Overview ¶
Package gi18n implements internationalization and localization.
Index ¶
Constants ¶
View Source
const (
// Default group name for instance usage.
DEFAULT_NAME = "default"
)
Variables ¶
This section is empty.
Functions ¶
func SetDelimiters ¶
func SetDelimiters(left, right string)
SetDelimiters sets the delimiters for translator.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager, it is concurrent safe, supporting hot reload.
func Instance ¶
Instance returns an instance of Resource. The parameter <name> is the name for the instance.
func (*Manager) SetDelimiters ¶
SetDelimiters sets the delimiters for translator.
func (*Manager) SetLanguage ¶
SetLanguage sets the language for translator.
type Options ¶
type Options struct { Path string // I18n files storage path. Language string // Local language. Delimiters []string // Delimiters for variable parsing. }
Options is used for i18n object configuration.
func DefaultOptions ¶
func DefaultOptions() Options
DefaultOptions returns the default options for i18n manager.
Click to show internal directories.
Click to hide internal directories.