public final String getShortCodeWithCountryAndVariant() {
    String name = getShortCode();
    if (getCountries().length == 1 && !name.contains("-x-")) {   // e.g. "de-DE-x-simple-language"
      name += "-" + getCountries()[0];
      if (getVariant() != null) {   // e.g. "ca-ES-valencia"
        name += "-" + getVariant();
      }
    }
    return name;
  }
public final String getShortCodeWithCountryAndVariant ( ) { String name = getShortCode ( ) ; if ( getCountries ( ) . length == 1 && ! name . contains ( "-x-" ) ) { name += "-" + getCountries ( ) [ 0 ] ; if ( getVariant ( ) != null ) { name += "-" + getVariant ( ) ; } } return name ; }
Get the short name of the language with country and variant (if any), if it is
a single-country language. For generic language classes, get only a two- or
three-character code.
@since 3.6