@verbx/localize-runtime
v0.2.0
Published
VerbX Localize — framework-agnostic runtime engine: detect, batch, cache, interpolate.
Readme
@verbx/localize-runtime
The framework-agnostic runtime engine behind every VerbX Localize SDK.
You do not install this directly — your framework package (@verbx/localize-react, -vue,
-next, -react-native, -angular, -electron) depends on it. It is documented here for people
building a new adapter or reaching below the SDK.
What it does
- Locale detection — from device languages, an
Accept-Languageheader, or a stored choice. - Multi-tier cache — memory → persisted bundle → backend, so a string is paid for once.
- Batching and coalescing — cache misses in the same tick are sent as one request, and the same string requested twice in flight resolves once.
- Interpolation — placeholder detection and substitution, with the value never leaving the device.
- Degrade to source — a backend problem returns the source text;
t()is synchronous and never throws.
Notable exports
MemoryCache,PersistentCache— the cache tiers (PersistentCachetakes any key-value store).BatchQueue— the coalescing request queue.detectLocale,parseAcceptLanguage— locale resolution.DefaultContextCollector— attaches structural context to new-string requests.
Depends only on @verbx/localize-core.
Docs
License
Proprietary. See LICENSE.md and the VerbX terms of service.
