Skip to main content
useSyncExternalStore-compatible. Passed into TranslationProvider which subscribes internally and merges overrides into merchantOverrides. The studio bridge calls updateOverrides() via weaverse.internal.translationStore (also exposed as the deprecated weaverse.internal.themeTextStore alias). Shape: flat Record<string, string> — dot-notation keys map to values (e.g. “cart.title” → “Shopping Cart”).

Constructor

Returns

TranslationStore

Properties

Record<string, string>
required
Current flat translation overrides keyed by dot-path.

Methods

getServerSnapshot()

Returns the current server snapshot for useSyncExternalStore.

Returns

Record<string, string>

getSnapshot()

Returns the current client snapshot for useSyncExternalStore.

Returns

Record<string, string>

setOverrides()

Replaces all overrides and notifies subscribers.

Parameters

Record<string, string>
required

subscribe()

Subscribes to override changes and returns an unsubscribe callback.

Parameters

() => void
required

Returns

() => void

updateOverrides()

Merges changed overrides and notifies subscribers.

Parameters

Record<string, string>
required