private void fillLanguageDropDown() {
    Locale guiLocale = Settings.getInstance().getLanguage();
    DisplayLocale currentSortLocale =
        new DisplayLocale(new WbLocale(Settings.getInstance().getSortLocale()));

    Locale[] locales = readLocales();

    localeDropDown.removeAllItems();
    localeDropDown.addItem(new DisplayLocale(null));

    int index = 1; // 1 because we have already added a locale
    int currentIndex = -1;

    for (Locale ls : locales) {
      DisplayLocale wl = new DisplayLocale(new WbLocale(ls));
      wl.setDisplayLocale(guiLocale);
      localeDropDown.addItem(wl);
      if (wl.equals(currentSortLocale)) currentIndex = index;
      index++;
    }

    if (currentIndex != -1) {
      localeDropDown.setSelectedIndex(currentIndex);
    }
  }