spz-text
When to use
spz-text renders internationalized text by looking up translations and substituting placeholder values. It supports text slots and currency slots.
Supported layout
container
Example
Basic i18n text
With text slot
If the translation contains {name}, you can supply the value via slot-text-name:
With currency slot
Currency slots render an <spz-currency> component for proper currency formatting:
Attributes
Behavior
- The component fetches locale data from the locale service.
- It looks up the translation using the pattern
sections.{sectionId}.settings.{translationid}, wheresectionIdcomes from the nearest parent element with adata-section-idattribute. - Placeholders in the form
{name}are replaced with the correspondingslot-text-nameorslot-currency-nameattribute values. - Currency slots are wrapped in
<spz-currency>tags for proper formatting.
Notes
- This component does not expose custom actions.
- This component does not emit custom events.
- After rendering, the component adds the
i-spzhtml-textCSS class.