Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Global = "en-US"
Global global language
Functions ¶
func IsLocalizable ¶
IsLocalizable return model is localizable or not
func RegisterCallbacks ¶
RegisterCallbacks register callback into GORM DB
Types ¶
type Locale ¶
type Locale struct {
LanguageCode string `sql:"size:20" gorm:"primary_key"`
}
Locale embed this struct into GROM-backend models to enable localization feature for your model
func (*Locale) ConfigureResource ¶
ConfigureResource configure qor locale for Admin
type LocaleCreatable ¶
type LocaleCreatable struct {
Locale
}
LocaleCreatable if you embed it into your model, it will make the resource be creatable from locales, by default, you can only create it from global
func (LocaleCreatable) CreatableFromLocale ¶
func (LocaleCreatable) CreatableFromLocale()
CreatableFromLocale a method to allow your mod=el be creatable from locales
type LocalizeActionArgument ¶
LocalizeActionArgument localize action's argument
type Plugin ¶
type Plugin struct {
db.DBNames
plug.EventDispatcher
}
func (*Plugin) OnRegister ¶
func (p *Plugin) OnRegister()
Click to show internal directories.
Click to hide internal directories.