☝️Small business or a startup? See if you qualify for our special offer.
+
List of all demos

Localization

Translate your pivot table to provide end-users with a localized reporting experience.

Domain mismatchFlexmonster is used on the domain prod-flexmonster-container-service.tbvgv2m9krico.us-east-1.cs.amazonlightsail.com, which does not match the domain your license key was issued for (flexmonster.com)

Contact our team to request a key for the domain prod-flexmonster-container-service.tbvgv2m9krico.us-east-1.cs.amazonlightsail.com

You are using the following key:
Z707-XCI209-0Q203E-3I5M00-28254L-0B2Z2S-0L0T3F-1H3W3A-421F46

Current version: 2.9.107 (build 07/06/2025)

  • .js
  • .html
const pivot = new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  height: 430,
  toolbar: true,
  report: {
    dataSource: {
      type: "csv",
      filename: "https://cdn.flexmonster.com/data/data-en.csv",
    },
    slice: {
      rows: [{
        uniqueName: "Category"
      }],
      columns: [{
        uniqueName: "[Measures]"
      }],
      measures: [{
        uniqueName: "Price",
        aggregation: "sum",
        format: "currency"
      }]
    },
    formats: [{
      name: "",
      thousandsSeparator: ",",
      decimalSeparator: ".",
      decimalPlaces: 2,
    }, {
      name: "currency",
      currencySymbol: "$",
    }]
  },
  shareReportConnection: {
    url: "https://olap.flexmonster.com:9500",
  },
  beforetoolbarcreated: customizeToolbar,
});

let currentLang = "en";

const pdfFonts = {
  "en": "https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf",
  "fr": "https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf",
  "it": "https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf",
  "es": "https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf",
  "pt": "https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf",
  "zh": "https://cdn.flexmonster.com/fonts/NotoSansCJKsc-Regular.ttf",
  "uk": "https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf",
};

function setLocalization(lang) {
  currentLang = lang;
  pivot.setReport({
    dataSource: {
      type: "csv",
      filename: "data/data-" + lang + ".csv",
    },
    localization: "loc/" + lang + ".json",
    formats: [{
      name: "",
      thousandsSeparator: ",",
      decimalSeparator: ".",
      decimalPlaces: 2,
      currencySymbol: "$",
    }]
  });
}

function customizeToolbar(toolbar) {
  toolbar.exportHandler = (type) => {
    if (type === "pdf") {
      pivot.exportTo(type, {
        fontUrl: pdfFonts[currentLang],
      });
    } else {
      pivot.exportTo(type);
    }
  };
  toolbar.showShareReportTab = true;
}
<button onclick="setLocalization('en')">EN</button>
<button onclick="setLocalization('fr')">FR</button>
<button onclick="setLocalization('it')">IT</button>
<button onclick="setLocalization('es')">ES</button>
<button onclick="setLocalization('pt')">PT</button>
<button onclick="setLocalization('zh')">ZH</button>
<button onclick="setLocalization('uk')">UK</button>

<div id="pivot-container"></div>

You can easily translate labels, text messages, captions, and other text elements of the pivot table into the language of your choice.

Simply specify the path to the localization file — a JSON file with key-value pairs, where a key is the component's element and a value is the translation of its text into the respective language.

It is possible to translate the entire component using global settings or override localizations within specific reports.

See more details on how to localize the web pivot table in the Localizing the component guide.