Documentation
¶
Overview ¶
Package lang gives the kit the text of a string key in the language of the application
Index ¶
- func Install(text func(key txt.Key, args ...any) string)
- func InstallKeys(name func(id string) string)
- func Keys(text string) string
- func OfID(prefix, id, suffix, fallback string) string
- func Or(name, fallback string, args ...any) string
- func T(key txt.Key, args ...any) string
- func Upper(text string) string
- func Use(id string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallKeys ¶
InstallKeys sets the function that names the keys of an action for the {key:action.id} placeholders of catalog texts
func Keys ¶
Keys is 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 OfID ¶
OfID is the text kept for an identifier between a key prefix and suffix, identifiers that end in a number sharing the text of n with the number as its argument, the fallback when the application has none
func Or ¶
Or is the text of the catalog entry with a name made at run time, the fallback when the catalog holds no such entry or the application has installed no source
func T ¶
T is the text of a catalog key in the active language, the name of the key while the application has installed no source
Types ¶
This section is empty.