package
Version:
v0.0.0-...-00e0705
Opens a new window with list of versions in this module.
Published: Mar 11, 2018
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
- Constants
-
type I18n
-
func (p *I18n) All(l string) (map[string]string, error)
-
func (p *I18n) E(lang, code string, args ...interface{}) error
-
func (p *I18n) H(lang, code string, obj interface{}) (string, error)
-
func (p *I18n) Languages() ([]string, error)
-
func (p *I18n) Set(db orm.DB, lang, code, message string) error
-
func (p *I18n) Sync(root string) error
-
func (p *I18n) T(lang, code string, args ...interface{}) string
-
type Model
I18n i18n
New load from database and filesystem
All get all items by lang
Languages all available languages
Sync sync items from filesystem to database
type Model struct {
ID uint `json:"id"`
Lang string `json:"lang"`
Code string `json:"code"`
Message string `json:"message"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
Model locale database model
Source Files
¶
Click to show internal directories.
Click to hide internal directories.