Documentation
¶
Index ¶
- func NewInstance()
- type ControllerInstance
- func (c *ControllerInstance) ConfigIris(app *iris.Application)
- func (c *ControllerInstance) Load(globPattern string, languages ...string) error
- func (c *ControllerInstance) LoadFS(fileSystem fs.FS, pattern string, languages ...string) error
- func (c *ControllerInstance) Tr(lang string, key string, args ...interface{}) string
- func (c *ControllerInstance) TrDefault(key string, args ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ControllerInstance ¶
type ControllerInstance struct {
// contains filtered or unexported fields
}
var Instance *ControllerInstance
func (*ControllerInstance) ConfigIris ¶
func (c *ControllerInstance) ConfigIris(app *iris.Application)
ConfigIris config iris i18n
func (*ControllerInstance) Load ¶
func (c *ControllerInstance) Load(globPattern string, languages ...string) error
Load is a method shortcut to load files using a filepath.Glob pattern. It returns a non-nil error on failure.
func (*ControllerInstance) LoadFS ¶
LoadFS is a method shortcut to load files using an `embed.FS` or `fs.FS` or `http.FileSystem` value. The "pattern" is a classic glob pattern.
func (*ControllerInstance) Tr ¶
func (c *ControllerInstance) Tr(lang string, key string, args ...interface{}) string
Tr returns a translated message based on the "lang" language code and its key with any optional arguments attached to it.
func (*ControllerInstance) TrDefault ¶
func (c *ControllerInstance) TrDefault(key string, args ...interface{}) string
TrDefault returns a translated message based on the default language code and its key with any optional arguments attached to it.
Click to show internal directories.
Click to hide internal directories.