code: public static String getLocaleNames(List<Locale> locales) {
  
          StringBuffer result = new StringBuffer();
          if (locales != null) {
              Iterator<Locale> i = locales.iterator();
              while (i.hasNext()) {
                  result.append(i.next().toString());
                  if (i.hasNext()) {
                      result.append(", ");
                  }
              }
          }
          return result.toString();
      }
docs: Returns the locale names from the given List of locales as a comma separated String.<p>
  
  For example, if the input List contains <code>{@link Locale#ENGLISH}</code> and
  <code>{@link Locale#GERMANY}</code>, the result will be <code>"en, de_DE"</code>.<p>
  
  An empty String is returned if the input is <code>null</code>, or contains no elements.<p>
  
  @param locales the locales to generate a String from
  
  @return the locale names from the given List of locales as a comma separated String