Internationalization

The visualizations provided by this library have some static text that you can change and internationalize depending on the end-user's locale. SViz currently supports English ('en') and Portuguese ('pt').
To support another language, you should create a folder locales/[language-abbrv]/ and create the corresponding translation.json file. Use the Portuguese or English file as sample by copying and translating its contents.
The files are structured as follows:

{
    "visualization1": {
        "text_1_id": "Translated Text 1",
        "text_2_id": "Translated Text 2",
        ...
    },
    ...
}

change only the "Translated Texts".

To force a particular language (the default is 'en'), you should initialize SViz with the correspoding language:

//set the language to Portuguese
SViz.init({ lang: "pt" });

The init function can be called multiple times (e.g. whenever the user sets his language).