Customize locale

Customize locale

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.

If your organization manages your browser settings, and your administrator or developer has already set your browser locale, ThoughtSpot automatically defaults to that locale.

You can set locale via ThoughtSpot UI, API, and Visual Embed SDK.

Set Locale 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 property in the SDK.

Supported locale IDs🔗

LocaleLanguage

ar-EG

Egyptian Arabic

da-DK

Dansk

de-DE

Deutsch

en-AU

English (Australia)

en-CA

English (Canada)

en-DE

English (Germany)

en-IN

English (India)

en-GB

English (United Kingdom)

en-US

English (United States)

es-US

Español (Latinoamérica)

es-ES

Español (España)

fi-FI

Suomi

fr-CA

Français (Canada)

fr-FR

Français (France)

it-IT

Italiano

ja-JP

Japanese (Japan)/ 日本語

nb-NO

Norsk

nl-NL

Nederland

pt-BR

Português (Brasil)

pt-PT

Português (Portugal)

ru-RU

Russian (Russia)

sv-SE

Svenska

zh-CN

中文(简体)

zh-HANT

中文 (繁體)

This example sets the locale of the embedded Liveboard to Español.

const liveboardEmbed = new LiveboardEmbed(document.getElementById('ts-embed'), {
    frameParams: {
        width: '100%',
        height: '100%',
    },
    liveboardId: '<%=liveboardGUID%>',
    locale: 'es-ES',
});

The locale property defines the overall language of the app, and the default formats for numbers, dates, and currencies. To override the default number, date, and currency format set by the locale parameter, define the following attributes in the init code as shown in this example:

init({
    //...
    numberFormatLocale: 'en-US',
    dateFormatLocale: 'en-IN',
    currencyFormat: 'USD',
});
  • numberFormatLocale String
    Specify your preferred locale identifier. The numbers on the embedded visualizations will be displayed as per the defined format. For example, if you specify en-US, large numbers on the visualizations will be displayed with the comma thousands separator and a period decimals separator as shown here:s

    xxx,xxx.xx

  • dateFormatLocale String
    Specify your preferred locale identifier. For example, setting en_US shows the date format as MM/dd/yyyy.

  • currencyFormat String
    Specify a three-digit currency ISO code. For example, to set currency format to United States dollar, specify USD.

Locale settings in the UI🔗

ThoughtSpot application users can set their locale preference on the Profile settings page. To open the profile settings page, click the user icon on the top navigation bar and then edit your locale preference.

For more information, see ThoughtSpot Product Documentation.

Set locale via REST API🔗

The following REST API v1 and v2 endpoints allow updating locale preference for ThoughtSpot users:

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.