final class UILocale
package smidr
Pluggable translation hook. The host application assigns translate to its own
localization lookup; the library itself stays dependency-free and falls back to the
supplied default string. Call refresh() after a locale switch to re-render live widgets.
Static variables
statictranslate:(key:String, fallback:String) ‑> String = null
(key, fallback) -> localized. null = identity (fallback returned).
Static methods
staticinlinet(key:String, fallback:String):String
Resolves a localized string through the host's translate hook.
Parameters:
key | the translation key |
|---|---|
fallback | returned verbatim when no hook is assigned (also the source string) |
Returns:
the localized text