03 Internationalisation - abrice/zyanfsv GitHub Wiki

Zyan Financial Statement Visualisation supports multiple languages. A standard taxonomy object is used which contains the following languages:

  • English (New Zealand)
  • Maori (New Zealand)

A different taxonomy object can be introduced using the command specification and a separate taxonomy file.

Taxonomy object and the command specification

  • To set the default language:

          commandSpec.i18 = {"default":"en"};
    
  • To set the taxonomy file source:

          commandSpec.dataManager.i18 = {};
          commandSpec.dataManager.i18.source = {type:"i18",
              filepath:"data/taxonomy", filename:"zfsv01", 
              filetype:"csv",shorttext:"i18 full text",
              filespec: {
                  validrowcolumnname: "translatorCode",
                  columnheadersrow: 1,    // not zero based
                  idrow:0,                // not zero based
                  startcolumn:1           // not zero based
              }};
    

Taxonomy file

The taxonomy file holds the actual text that will appear within the visualisation if the schema uses i18 language conversion. The file:

  • Must be of a type .csv
  • Must contain a first column called [translatorCode]
  • Must contain one column for each language to be displayed. Each additional language column must use as its column header the two character language identifier

For example:

        translatorCode, en,               ma
        revenue.total,  Revenue,          Moni
        cost.revenue,   Cost of Revenue,  Utu o te Moni