dom.getGlobalDefinition().setLanguage("en");
//to refresh the views, do the following:
TypeVisualizerFactory.getInstance().releaseCache(dom);
//Recreate your EditorPanel and add it to the container again
EditorPanel panel = new EditorPanel(dom.getRootType(), myFrame);
myFrame.getContentPane().removeAll();
myFrame.getContentPane().add(panel, BorderLayout.CENTER);