Language Support Dialog
A dialog component for displaying language support information.
Demo
Cookie status:
API
Tag
| Name | Description |
<aui-language-support-dialog>
|
Custom Element for displaying language support information in a dialog. |
Attributes
| Name | Value | Required | Description |
localeswitcheroptionslist |
Array of LocaleSwitcherOption objects or JSON string | Yes |
A list of locale options available to the user. Each option should have a
Example: |
currentlocale |
String (locale code) | Yes |
The current locale code (e.g., "fr-FR", "en-US"). The dialog may automatically display when the current locale does not start with "en" (i.e., when English is not selected). When the current locale starts with "en", the dialog will not be shown. |
disabled |
Boolean | No |
Disable the language support dialog. When unset, the dialog may automatically display when other conditions are met. |
Behavior
The Language Support Dialog automatically opens when all of the following conditions are met:
- The current locale is not English (does not start with "en")
- There are 2 or more locales in the
localeswitcheroptionslist - The component is not disabled
- The user has not previously dismissed the dialog (tracked via the
language-support-dialog-dismissedcookie)
When the user closes the dialog (by clicking "Got it" or the X button), a cookie named
language-support-dialog-dismissed is set to prevent the dialog from showing again.
Events
| Name | Detail | Description |
s-dismiss |
The closed Dialog's id and returnValue |
Fires after the Dialog was closed, which happens when the user presses the Escape key or clicks the dismiss
button or when the application calls |
Methods
| Name | Description |
resetState() |
Forces the component to re-check the |
Demo
API
Tag
| Name |
<AuiLanguageSupportDialog>
|
Props
| Name | Value | Required | Description |
localeSwitcherOptionsList |
Array of LocaleSwitcherOption objects | Yes |
A list of locale options available to the user. Each option should have a
Example: |
currentLocale |
String (locale code) | Yes |
The current locale code (e.g., "fr-FR", "en-US"). The dialog may automatically display when the current locale does not start with "en" (i.e., when English is not selected). When the current locale starts with "en", the dialog will not be shown. |
disabled |
Boolean | No |
Disable the language support dialog. When unset, the dialog may automatically display when other conditions are met. |
onSDismiss |
Function |
Handles the |
Behavior
The Language Support Dialog automatically opens when all of the following conditions are met:
- The current locale is not English (does not start with "en")
- There are 2 or more locales in the
localeSwitcherOptionsList - The component is not disabled
- The user has not previously dismissed the dialog (tracked via the
language-support-dialog-dismissedcookie)
When the user closes the dialog (by clicking "Got it" or the X button), a cookie named
language-support-dialog-dismissed is set to prevent the dialog from showing again.
Skylab React links
Design
Design resources can be found on the Skylab design documentation site: skylab.avalara.com