Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. User
  • Overview
  • Usage
  • Components Customization
  • Elements
    • Apps Icons
    • Breadcrumb
    • Color Picker
    • Conditional Fields
    • Count Down
    • Filters
    • Infinite Scroll
    • List Tile
    • Loading
    • Map
    • Modal
    • Placeholder
    • Progress Bar
    • Rating Stars
    • Reviews
    • Reviews Summary
    • Sheet
    • Skeleton
    • Slider
    • Social
    • Social Share
    • Tabs
  • Form
    • Button
    • Bottom Alert
    • Contacts
    • Date Time Picker
    • File Upload
    • Menu
    • Quantity Input
    • Select
    • Tel Input
  • Product
    • Add Product
    • Advertisement
    • Comments
    • Conditional Offer
    • Gifting
    • Installment
    • Meta Data
    • Offer
    • Offer Modal
    • Orders
    • Payments
    • Product Availability
    • Product Card
    • Products List
    • Product Options
    • Product Size Guide
    • Products Slider
    • Quick Buy
    • Quick Order
    • Scopes
    • Search
  • User
    • Cart Summary
    • Localization
    • Login
    • Loyalty
    • Rating
    • User Menu
    • User Profile
    • User Settings
    • Verify
  1. User

Localization

The <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
The <salla-localization-modal> must not be called more than once at the same page.
Note
Available API Endpoints for the Localization component are:
Get Language
Currencies
List Currencies
Change Currency

Example#

Localization

Usage#

HTML
SASS

Properties#

PropertyAttributeDescriptionTypeDefault
LanguagelanguageEnabling the current localization attribute, either existing or newly selectedstring'salla.config.get('user.language_code')'
CurrencycurrencyEnabling the current currency attribute, either existing or newly selectedstring'salla.config.get('user.currency_code')'

Methods#

The pre-defined 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.
MethodDescriptionReturn Type
close()Closes the localization's componentPromise<HTMLElement>
open()Opens the localization's componentPromise<boolean>
submit()Submits the language/currency dataPromise<void>

Slots#

The slots makes it customizable to modify certain labels, such as currency & language, as well as adding header & footer extended features.
SlotDescription
currencyReplaces currency label with replaceable props which are {name}, {code}, {country_code}.
languageReplaces language label with replaceable props which are {name}, {code}, {country_code}.
headerReplaces the top of the modal.
footerReplaces the bottom of the modal.
Modified at 2025-03-04 12:54:02
Previous
Cart Summary
Next
Login