Documentation
¶
Overview ¶
Package lang gives the kit the language of the window it draws in: its words for every text the window shows, its casing and the way it is written. One window speaks one language at a time; the server speaks each request's own, never this one
Index ¶
- func As(context, english string, args ...any) string
- func Copy(kind, id, field, english string) string
- func Error(err error) string
- func Errorf(english string, args ...any) error
- func InstallKeys(name func(id string) string)
- func Keys(text string) string
- func N(count any, one, other string, args ...any) string
- func RightToLeft() bool
- func Say(text base.Text) string
- func T(english string, args ...any) string
- func Upper(text string) string
- func Use(l *base.Language)
- func Version() uint64
- func Window() *base.Language
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func As ¶
A message whose English is said two ways, said in the window's language the way the context names
func Copy ¶
Registry copy in the window's language: what the language says under the structural name kind:id:field, else under the English
func Errorf ¶
An error a person reads, its English as written and its words said in the window's language where Error shows it
func InstallKeys ¶
Sets the function that names the keys of an action for the {key:action.id} placeholders of texts
func Keys ¶
The text with every {key:action.id} placeholder replaced by the keys bound to that action, so a text names a key the way it is bound now
func Say ¶
The text in the window's language, its {key:action.id} placeholders naming the keys bound now
func T ¶
A message said in the window's language, its {key:action.id} placeholders naming the keys bound now
func Upper ¶
The text in capitals by the casing of the window's language, Turkish and Azerbaijani keeping the dot of their i
Types ¶
This section is empty.