const appEmbed = new AppEmbed(document.getElementById('ts-embed'), {
frameParams: {
width: '100%',
height: '100%',
},
locale: 'es-ES',
});
Set locale and display language
The display language of the embedded ThoughtSpot UI is determined by the user’s system locale. If your browser locale matches one of the locale options supported by ThoughtSpot, the ThoughtSpot UI automatically changes to that locale. If your browser locale is not supported by ThoughtSpot, the embedded UI is displayed in US English by default. For example, if your browser locale is an unsupported Central American locale, such as Spanish (Mexico) (es-MX), ThoughtSpot launches in en-US. If your browser doesn’t allow you to change the locale, ThoughtSpot launches in the OS locale.
Note that if your organization manages your browser settings, and your administrator or developer has already set your browser locale, ThoughtSpot automatically defaults to that locale. In the full application embed mode, users can override locale by updating their language preference in profile settings.
Locale settings for embedded ThoughtSpot app🔗
If you have embedded the full ThoughtSpot app, your application users can set the locale on their profile settings page. The profile settings page will be visible to your users only when the disableProfileAndHelp
attribute is set to false
and showPrimaryNavbar
set to true
in the SDK.
To set the locale on the profile settings page:
-
In the embedded app, click the user icon in the navigation bar.
-
Click View my profile.
-
Next to Preferences, click Edit.
-
Select the drop-down menu icon to set the locale to your preferred language.
-
Refresh your browser page.
You can also use the /tspublic/v1/user/updatepreference
REST API endpoint to change a user’s locale preference. For more information, see User API.
Locale configuration in the SDK🔗
If you want to set your embedded app view to a specific locale for your application users, you can configure the locale
attribute in the SDK.
ThoughtSpot supports the following locale identifiers in the locale
string:
Locale | Language |
---|---|
| Dansk |
| Deutsch |
| English (Australia) |
| English (Canada) |
| English (India) |
| English (United Kingdom) |
| English (United States) |
| Español (Latinoamérica) |
| Español (España) |
| Français (Canada) |
| Français (France) |
| Italiano |
| Nederland |
| Norsk |
| Português (Brasil) |
| Português (Portugal) |
| Suomi |
| Svenska |
| 中文(简体) |
| 中文 (繁體) |
| 日本語 |
This example sets the locale of the embedded ThoughtSpot app to Español.
The following example sets the display language of Liveboard and visualization pages to Deutsch.
const liveboardEmbed = new LiveboardEmbed(document.getElementById('ts-embed'), {
frameParams: {
width: '100%',
height: '100%',
},
liveboardId: '<%=liveboardGUID%>',
vizId: '<%=vizGUID%>',
locale: 'de-DE',
});
Limitations🔗
-
ThoughtSpot does not translate column names, object titles, description text, formulas, or metadata entered by the user. For example, if you name a visualization Sales performance in any variant of English and subsequently change the locale to Español, the name of the visualization remains Sales performance.
-
If you specify a currency when uploading data, that currency format does not change when the locale changes.
-
ThoughtSpot translates keywords, operators, and error messages. See Keyword reference for all supported languages.