Documentation ¶
Index ¶
- Constants
- func CreateCookie(w http.ResponseWriter, localization string, cy core.Cypher) error
- func ReadCookie(req *http.Request, cy core.Cypher) (string, error)
- type Localizer
- type LocalizerStore
- func (ls LocalizerStore) CreateCookie(w http.ResponseWriter, localization string)
- func (ls LocalizerStore) Get(key, language string) Localizer
- func (ls LocalizerStore) GetLocalizedError(err core.UseCaseError, req *http.Request) string
- func (ls LocalizerStore) GetUsingRequest(key string, req *http.Request) Localizer
- func (ls LocalizerStore) GetUsingRequestWithoutShared(key string, req *http.Request) Localizer
- func (ls LocalizerStore) GetWithoutShared(key, language string) Localizer
- func (ls LocalizerStore) LoadIntoField(field **Localizer, key string, language string)
- func (ls LocalizerStore) LoadIntoFieldUsingRequest(field **Localizer, key string, req *http.Request)
- func (ls LocalizerStore) ReadCookie(req *http.Request) string
Constants ¶
View Source
const ContextKey string = "phx_localization"
Variables ¶
This section is empty.
Functions ¶
func CreateCookie ¶
Types ¶
type LocalizerStore ¶
type LocalizerStore struct {
// contains filtered or unexported fields
}
func NewLocalizerStore ¶
func (LocalizerStore) CreateCookie ¶ added in v0.0.44
func (ls LocalizerStore) CreateCookie(w http.ResponseWriter, localization string)
func (LocalizerStore) Get ¶
func (ls LocalizerStore) Get(key, language string) Localizer
func (LocalizerStore) GetLocalizedError ¶
func (ls LocalizerStore) GetLocalizedError(err core.UseCaseError, req *http.Request) string
func (LocalizerStore) GetUsingRequest ¶
func (ls LocalizerStore) GetUsingRequest(key string, req *http.Request) Localizer
func (LocalizerStore) GetUsingRequestWithoutShared ¶
func (ls LocalizerStore) GetUsingRequestWithoutShared(key string, req *http.Request) Localizer
func (LocalizerStore) GetWithoutShared ¶
func (ls LocalizerStore) GetWithoutShared(key, language string) Localizer
func (LocalizerStore) LoadIntoField ¶
func (ls LocalizerStore) LoadIntoField(field **Localizer, key string, language string)
func (LocalizerStore) LoadIntoFieldUsingRequest ¶
func (ls LocalizerStore) LoadIntoFieldUsingRequest(field **Localizer, key string, req *http.Request)
func (LocalizerStore) ReadCookie ¶ added in v0.0.44
func (ls LocalizerStore) ReadCookie(req *http.Request) string
Click to show internal directories.
Click to hide internal directories.