[]
        
(Showing Draft Content)

Localization

Localization of the user interface helps users to use the tool across various languages and locales effectively. DsImageViewer supports localization of the tool to any language using language property of ViewerOptions class.

Refer to the following example code to change the default button names to German:

// Add German translations of the default button names.
var myTranslations = {
    "toolbar": {
        "open": "Öffnen",
        "save": "Speichern",
        "print": "Drucken",
        "save-as": "Speichern unter"
    }
};

// Initialize translations.
DsImageViewer.i18n.init({
    resources: { myLang: { translation: myTranslations } }
});

// Initialize DsImageViewer and set user interface language to German.
var viewer = new DsImageViewer(selector, { language: 'myLang' });

localization