getDisplayVariant()
String getDisplayVariant()
- Returns a name for the locale's variant code.
String getDisplayVariant(Locale inLocale)
- Returns a name for the locale's variant code.
import java.util.Locale;
public class MainClass {
public static void main(String args[]) throws Exception {
Locale defaultLocale = Locale.getDefault();
System.out.println(defaultLocale.getDisplayVariant());
System.out.println(defaultLocale.getDisplayVariant(Locale.US));
System.out.println((new Locale("en", "US", "WIN_TX_Austin")).getDisplayVariant());
}
}