docs: private void setupLocale(OptionsParam options) {
          // Prompt for language if not set
          String locale = options.getViewParam().getConfigLocale();
          if (locale == null || locale.length() == 0) {
  
              // Don't use a parent of the MainFrame - that will initialise it
              // with English!
              final Locale userloc = determineUsersSystemLocale();
              if (userloc == null) {
                  // Only show the dialog, when the user's language can't be
                  // guessed.
                  setDefaultViewLocale(Constant.getSystemsLocale());
                  final LocaleDialog dialog = new LocaleDialog(null, true);
                  dialog.init(options);
                  dialog.setVisible(true);
  
              } else {
                  options.getViewParam().setLocale(userloc);
              }
  
              setDefaultViewLocale(createLocale(options.getViewParam().getLocale().split("_")));
  
              Constant.setLocale(Model.getSingleton().getOptionsParam().getViewParam().getLocale());
              try {
                  options.getViewParam().getConfig().save();
              } catch (ConfigurationException e) {
                  logger.warn("Failed to save locale: ", e);
              }
          }
      }