-es')
  var editor = null

  var initEditor = function () {
    if (editor) {
      editor.destroy()
    }

    editor = new JSONEditor(document.querySelector('#editor-container'), {
      theme: 'bootstrap4',
      disable_edit_json: true,
      disable_properties: true,
      disable_collapse: true,
      ajax: true,
      show_errors: 'always',
      schema: {
        $ref: './validation-messages.json',
      }
    })
  }

  switchEs.addEventListener('click', function () {
    JSONEditor.defaults.languag