Internationalization 2.0.0 - Documentation

SnapEditor comes with a default English pack built-in. An example of the English pack can be found at /snapeditor/lang/en.js. It is a simple JavaScript file that contains a single object with keys and values. The values are the language specific text to be displayed.

If you wish to create your own language pack, create a new JavaScript file, such as /snapeditor/lang/fr.js. Copy the contents of /snapeditor/lang/en.js into the new file. Go through all the values and replace them with the language specific text you want displayed.

Now add a script tag pointing to your new language pack. Make sure that the language pack is sourced before SnapEditor, not after.

<script type="text/javascript" src="/snapeditor/lang/fr.js"></script>
<script type="text/javascript" src="/snapeditor/snapeditor.js"></script>
<script type="text/javascript">
  var inPlaceEditor = new SnapEditor.InPlace("editor");
</script>

List of language packs:

If you would like to contribute a language pack, please contact us using the feedback form. Thanks!