[]
        
(Showing Draft Content)

Globalization

SpreadJS supports over 450 different culture info which can be used through the SpreadJS globalization javascript library. This library can be built from the SpreadJS Globalization Project found here.


The output javascript file spreadjs.globalization.min.js contains the global variable named cultureInfos array that contains 450+ culture instances. You can insert a script tag to import the javascript file into the HTML file.

<script src="spreadjs.globalization.min.js"></script>

The following code sample shows how to fetch one or more cultures from the array and register them to the Spread Culture Manager.

// Configure Workbook and Worksheet
var spread = new GC.Spread.Sheets.Workbook("ss");
var activeSheet = spread.getActiveSheet();

let cultureInfo = cultureInfos.find(function(cultureInfo){
   return cultureInfo.id===0x407;
})

if (cultureInfo) {
   GC.Spread.Common.CultureManager.addCultureInfo(cultureInfo.name(),cultureInfo);
}