code: public void translate(String language) {
      switch (language) {
        case "EN":
          rootPane.rbs.changeLocale(rootPane.rbEN);
          break;
        case "DE":
          rootPane.rbs.changeLocale(rootPane.rbDE);
          break;
        default:
          throw new IllegalArgumentException("Not a valid locale");
      }
    }
docs: Sets the locale of the form.
  
  @param language The language identifier for the new locale. Either DE or EN.