Skip to Content

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:

  1. The exact language, for example fr-CA.
  2. The base language, for example fr.
  3. default, or the value itself when it is one string.
  4. 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.

KeyWhere the viewer sees itBuilt-in EnglishOld key (still works)
filter.applyApply in the filter panel and the date picker“Apply”-
filter.resetThe reset button of the filter panel“Reset Filters”-
filter.clearThe clear button of a filter menu and the date picker“Clear”, “Clear All”-
filter.customThe custom range option of a date filter set to show a list of presetsThe text the embed shows today-
filter.searchThe search box placeholder in a filter menu“Search”-
filter.selectAllSelect all in a filter that takes many values“Select All”-
filter.noOptionsA filter menu with no values“No options are available. Try changing the other filters.”-
empty.titleA card with no data, the title“Build your first view”, “No data available”, or the text the screen shows todayempty, noData
empty.bodyA card with no data, the line under the titleThe text the embed shows today-
error.titleA card that cannot load, the titleThe text the embed shows todayerror
error.retryThe retry button on a card that cannot load“Reload”, “Try again”, or the text the screen shows todayretry
card.downloadDownload in the card menu (legacy design)“Download”-
card.fullScreenFull screen in the card menu“Enter fullscreen”, “Enter FullScreen”, “Fullscreen”-
loadingWhat 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.