DatAInsights Composer GlobalizationPremium
The globalization process combines the translation of component messages with adapting them to specific locales. The globalization support article lists the globalization features of each KendoReact component.
Internationalization
The internationalization process applies specific culture formats to a web application. The DatAInsights Composer formats the dates of the History items, the Grid aggregates, and the Gauge values in the culture of the nearest IntlProvider.
For more information, refer to:
- KendoReact documentation on internationalization
- kendo-intl (the base Internationalization package on GitHub)
Messages
The DatAInsights Composer supports the localization of its messages by utilizing the KendoReact Internationalization package.
The messages that the AI returns, for example, the text of a clarification question, are shown as they are. The DatAInsights Composer does not translate them.
The following example demonstrates how to load and apply the messages.
The package exports a constant for each message key, named after the key without the datAInsightsComposer. prefix, for example, title or generateButton. You can use these constants as the keys when you call loadMessages. The datAInsightsComposerMessages export holds all keys with their default values.
import { loadMessages } from '@progress/kendo-react-intl';
import { title, generateButton } from '@progress/kendo-react-datainsights-composer';
loadMessages({ [title]: 'Que souhaitez-vous explorer ?', [generateButton]: 'Générer' }, 'fr-FR');
The following table lists the built-in message keys and their default values.
| Message Key | Default Value |
|---|---|
datAInsightsComposer.label | AI Report Builder |
datAInsightsComposer.title | What would you like to explore? |
datAInsightsComposer.promptPlaceholder | e.g. "Show revenue by region as a bar chart" |
datAInsightsComposer.refinePlaceholder | e.g. "Group by category" or "Switch to a line chart" |
datAInsightsComposer.refineFieldLabel | Refine this report |
datAInsightsComposer.loadingMessage | Working on it… |
datAInsightsComposer.generatingMessage | Generating your report... |
datAInsightsComposer.generateButton | Generate |
datAInsightsComposer.applyButton | Generate |
datAInsightsComposer.tryAgainButton | Generate |
datAInsightsComposer.stopButton | Stop generating |
datAInsightsComposer.generatingButton | Generating |
datAInsightsComposer.refineButton | Refine |
datAInsightsComposer.confirmButton | Confirm |
datAInsightsComposer.discardButton | Discard |
datAInsightsComposer.discardActionText | Discard |
datAInsightsComposer.removeButton | Remove |
datAInsightsComposer.historyButton | History |
datAInsightsComposer.clarificationMessage | Add more detail to your prompt to generate a visualization. |
datAInsightsComposer.unsupportedMessage | The request cannot be fulfilled with the available fields. |
datAInsightsComposer.aiDeclinedMessage | The AI declined to fulfill this request. Please rephrase your prompt and try again. |
datAInsightsComposer.unsupportedAlternativesMessage | You can show this data as {0}. |
datAInsightsComposer.alternativesListSeparator | , |
datAInsightsComposer.alternativesLastMessage | {0}, or {1} |
datAInsightsComposer.aiServiceErrorMessage | An error occurred while contacting the AI service. Please try again. |
datAInsightsComposer.renderErrorMessage | This report could not be displayed. |
datAInsightsComposer.invalidConfigMessage | Invalid configuration — some fields are not available in the current dataset. |
datAInsightsComposer.invalidStructureMessage | The configuration cannot be rendered: {0}. |
datAInsightsComposer.disallowedTypeMessage | A {0} is not available here. |
datAInsightsComposer.componentTypeChangedMessage | Refining changed the visualization from {0} to {1}, which isn't allowed here. |
datAInsightsComposer.tooManyCategoriesMessage | "{0}" has more than {1} distinct values, which is too many to chart. Try grouping by a coarser field. |
datAInsightsComposer.noDataMessage | No data matches this request. Try different values or a different wording. |
datAInsightsComposer.datasetNotResolvedMessage | Couldn't find a dataset matching that request. Try rephrasing it. |
datAInsightsComposer.ambiguousDatasetMessage | That request could match more than one dataset ({0}). Which did you mean? |
datAInsightsComposer.historyHeading | Version History |
datAInsightsComposer.historyVersionTitle | Version history |
datAInsightsComposer.historyRestoreButton | Restore {0} |
datAInsightsComposer.historyRestoreTitle | Restore to this version |
datAInsightsComposer.historyToday | Today, {0} |
datAInsightsComposer.historyEmpty | No history yet. |
datAInsightsComposer.browseDataSourcesButton | Data Source |
datAInsightsComposer.availableDataSourcesLabel | Available data sources |
datAInsightsComposer.searchDataSourcesPlaceholder | Search data sources |
datAInsightsComposer.dataSourcesPopupLabel | Datasets |
datAInsightsComposer.dataSourceFieldsLabel | {0} fields |
datAInsightsComposer.aggregateSum | Sum |
datAInsightsComposer.aggregateAverage | Average |
datAInsightsComposer.aggregateCount | Count |
datAInsightsComposer.aggregateMin | Min |
datAInsightsComposer.aggregateMax | Max |
The generateButton, tryAgainButton, and applyButton keys all default to Generate, so the submit button keeps the same text in every state. Each key labels the submit button in a different situation, so you can customize them separately:
generateButton—The submit button of the main prompt, for example,Generate.tryAgainButton—ReplacesgenerateButtonafter a request fails or the AI cannot build a visualization from the prompt, for example,Try again.applyButton—The submit button of the refine prompt that appears after the user selectsRefine, for example,Apply.