Documentation
¶
Overview ¶
Package i18n provides immutable ICU MessageFormat catalogs and request middleware.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMessageNotFound = errors.New("i18n: message not found")
Functions ¶
func Middleware ¶
func Middleware(bundle *Bundle) middleware.Middleware
Middleware selects locale from session, then platform event, then bundle default. Place it after state.SessionMiddleware to enable persisted locale selection.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
Bundle is immutable after construction and safe for concurrent translations.