Flexmonster - Localization
by Flexmonster Pivot Table
HTML
<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://s3.amazonaws.com/flexmonster/2.3/flexmonster.js"></script>
<button onclick="setLocalization('en')">English</button>
<button onclick="setLocalization('fr')">Français</button>
<button onclick="setLocalization('es')">Español</button>
<button onclick="setLocalization('pr')">Português</button>
<button onclick="setLocalization('ch')">中国的</button>
<button onclick="setLocalization('ua')">Українська</button>
<div id="pivot-container"></div>
JavaScript
function setLocalization(lang) {
pivot.setReport({
dataSource: {
dataSourceType: "csv",
filename: "data/data-" + lang + ".csv"
},
localization: "loc/" + lang + ".json"
});
}
var pivot = $("#pivot-container").flexmonster({
global: {
localization: "loc/es.json"
},
report: {
dataSource: {
dataSourceType: "csv",
filename: "data/data-es.csv"
},
options: {
configuratorActive: false
}
},
width: "100%",
height: 430,
toolbar: true,
componentFolder: "https://s3.amazonaws.com/flexmonster/2.3/"
});