Reference
Text overrides
Put your own words, in more than one language, on embed buttons and card states.
Set custom-messages with the text keys below. A value is one string, or one string per language with a default. The new keys require the plugin release listed in Changelog and versioning.
<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
language="fr-CA"
custom-messages='{
"filter.apply": "Apply filters",
"empty.title": { "default": "Nothing here yet", "fr": "Rien pour le moment" }
}'
></dbn-dashboard>For each key the embed picks, in this order, with the language from language:
- The exact language, for example
fr-CA. - The base language, for example
fr. default, or the value itself when it is one string.- The built-in English.
An empty string counts as not set, so a button is never blank. Your translationDictionary still applies to the result where it did before. A key that is not on the list is left out, with one console warning.
14 keys.
| Key | Where the viewer sees it | Built-in English | Old key (still works) |
|---|---|---|---|
filter.apply | Apply in the filter panel and the date picker | “Apply” | - |
filter.reset | The reset button of the filter panel | “Reset Filters” | - |
filter.clear | The clear button of a filter menu and the date picker | “Clear”, “Clear All” | - |
filter.custom | The custom range option of a date filter set to show a list of presets | The text the embed shows today | - |
filter.search | The search box placeholder in a filter menu | “Search” | - |
filter.selectAll | Select all in a filter that takes many values | “Select All” | - |
filter.noOptions | A filter menu with no values | “No options are available. Try changing the other filters.” | - |
empty.title | A card with no data, the title | “Build your first view”, “No data available”, or the text the screen shows today | empty, noData |
empty.body | A card with no data, the line under the title | The text the embed shows today | - |
error.title | A card that cannot load, the title | The text the embed shows today | error |
error.retry | The retry button on a card that cannot load | “Reload”, “Try again”, or the text the screen shows today | retry |
card.download | Download in the card menu (legacy design) | “Download” | - |
card.fullScreen | Full screen in the card menu | “Enter fullscreen”, “Enter FullScreen”, “Fullscreen” | - |
loading | What screen readers hear while a card loads | “Loading chart” | - |
The four old keys empty, noData, error and retry keep working. When you set an old key and its new key, the new key wins.
For copy that has no text key, use a translation dictionary.