code: protected final String toLocaleStr(Locale locale) {
      if (locale == Locale.ROOT) { return ""; }
      String language = locale.getLanguage();
      String country = locale.getCountry();
      String variant = locale.getVariant();
      if (language == "" && country == "" && variant == "") { return ""; }
  
      StringBuilder sb = new StringBuilder();
      if (variant != "") {
        sb.append(language).append('_').append(country).append('_').append(variant);
      } else if (country != "") {
        sb.append(language).append('_').append(country);
      } else {
        sb.append(language);
      }
      return sb.toString();
    }
docs: Convert locale to string with language_country[_variant]
  
  @param locale
  @return locale string