# Localization

## Content

Localization of the user interface helps you use the tool across various languages and locales effectively. DsImageViewer supports localization of the tool to any language using [language](https://developer.mescius.com/document-solutions/javascript-image-viewer/api/interfaces/ViewerOptions#language) property of [ViewerOptions](https://developer.mescius.com/document-solutions/javascript-image-viewer/api/interfaces/ViewerOptions) interface.
Refer to the following example code to change the default button names to German:

```javascript
// 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](https://cdn.mescius.io/document-site-files/images/b882ef15-67ec-41e0-8e66-2977bfeb3645/localization.c05cfc.png)