Locale Switcher
Locale switcher
Demo
API
Tag
| Name | Description |
<aui-locale-switcher>
|
Custom Element to show the current locale setting and allow a user to change it to another configured locale. |
Attributes
| Name | Value | Required | Description |
optionslist |
string |
Stringified JSON array of option objects. See Guidelines below. |
|
icononly |
boolean |
When present, only show the international (world) icon. |
|
user |
String |
Stringified JSON of user object, see Guidelines below. |
|
skylabversion |
string |
(Deprecated) The current version of skylab-sdk used in your project. |
Properties
| Name | Value | Required | Description |
|---|---|---|---|
optionsList |
JSON |
Stringified JSON array of option objects. See Guidelines below. |
|
iconOnly |
boolean |
When present, only show the international (world) icon. |
|
user |
JSON |
Set this to user object JSON, see Guidelines below. |
|
requestCurrentAccessToken |
Function |
Function that returns a Promise resolving to |
Events
| Name | Detail | Description |
s-localeselect
|
|
Fired when a locale is selected. The event detail contains the selected locale. |
Demo
API
Tag
| Name | Description |
<AuiLocaleSwitcher>
|
Custom Element to show the current locale setting and allow a user to change it to another configured locale. |
Props
| Name | Value | Required | Description |
optionsList |
JSON |
Stringified JSON array of option objects. See Guidelines below. |
|
iconOnly |
boolean |
When present, only show the international (world) icon. |
|
user |
JSON |
Set this to user object JSON, see Guidelines below. |
|
requestCurrentAccessToken |
Function |
Function that returns a Promise resolving to |
|
onS-localeselect
|
Function |
Handles the s-localeselect event that fires when a locale is selected.
|
Skylab React links
Guidelines
Options list
The options list sets the available locales. If the list is empty or contains only one option, the component will not render as there is no selection to be made.
User object
If your app doesn't already have access to the Avalara Identity user data, then use AUI Identity to get it. API for <aui-locale-switcher> user data is
provided below.
or data can be assigned as attribute using stringified JSON
Design
Design resources can be found on the Skylab design documentation site: skylab.avalara.com