Localization
<salla-localization-modal>
web component shows the menu for the store's available languages and currencies. It consists of a Modal activated by the Button component that shows the menu for the store's available languages and currencies, and that can be customized using the properties' parameters.Alert
<salla-localization-modal>
must not be called more than once at the same page.Note
Example

Usage
HTML
SASS
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
Language | language | Enabling the current localization attribute, either existing or newly selected | string | 'salla.config.get('user.language_code')' |
Currency | currency | Enabling the current currency attribute, either existing or newly selected | string | 'salla.config.get('user.currency_code')' |
Methods
methods
allow for calling to call functions built by Salla to carry out certain actvities, such as close
/ open
the modal component or activating the action submit
.Method | Description | Return Type |
---|---|---|
close() | Closes the localization's component | Promise<HTMLElement> |
open() | Opens the localization's component | Promise<boolean> |
submit() | Submits the language/currency data | Promise<void> |
Slots
slots
makes it customizable to modify certain labels, such as currency
& language
, as well as adding header
& footer
extended features.Slot | Description |
---|---|
currency | Replaces currency label with replaceable props which are {name} , {code} , {country_code} . |
language | Replaces language label with replaceable props which are {name} , {code} , {country_code} . |
header | Replaces the top of the modal. |
footer | Replaces the bottom of the modal. |
Modified at 2025-03-04 12:54:02