code: public static List<Locale> getCandidateLocales(Locale locale) {
  
          String language = LanguageMatch.getAlias(locale);
          String country = FormatUtils.getRegion(locale);
          String variant = locale.getVariant();
  
          if (language.equals("zh") && locale.getScript().equals("Hant")) {
              country = "TW";
          }
  
          List<Locale> list = new LinkedList<>();
  
          if (!variant.isEmpty()) {
              list.add(new Locale(language, country, variant));
          }
  
          if (!country.isEmpty()) {
              list.add(new Locale(language, country, ""));
          }
  
          if (!language.isEmpty()) {
              list.add(new Locale(language, "", ""));
              if (language.equals("nn")) {
                  list.add(new Locale("nb", "", ""));
              }
          }
  
          list.add(Locale.ROOT);
          return list;
  
      }
docs: /*[deutsch]
  <p>Erstellt eine Kandidatenliste. </p>
  
  @param   locale  requested locale
  @return  list of candidates in roughly same order as in {@code java.util.ResourceBundle}