Skip to main content

Localized Content

Available from version 2.1.0 onwards.

The <sdpi-i18n> component provides rendering of localized content.

tip

For more information about defining and using localized messages, check out the localization helper page.

Example

Locales
SDPIComponents.i18n.locales = {
en: {
click_prompt: 'Click here...'
},
es: {
click_prompt: 'Haga clic aquí...'
},
fr: {
click_prompt: 'Cliquez ici...'
}
};
Property Inspector HTML
<sdpi-item>
<sdpi-button>
<sdpi-i18n key="click_prompt"></sdpi-i18n>
</sdpi-button>
</sdpi-item>

Result

English

A property inspector showing a button rendered using localizations in English

Spanish

A property inspector showing a button rendered using localizations in Spanish

French

A property inspector showing a button rendered using localizations in French

Configuration

The component supports the following configuration.

NameTypeDescription
keystringName of the localized message to render.