Wocart

@wocart/theme v4.1.0


@wocart/theme / index / localize

Function: localize()

localize(value, locales): string

The text for the first language in locales that value has, or undefined when it has none of them. A plain string applies to every language. Pass the requested language first, then the fallback chain.

Parameters

value

LocalizedText

locales

readonly string[]

Returns

string