List of usage examples for java.util Locale getDefault
public static Locale getDefault()
From source file:Main.java
public static void main(String[] args) { Locale locale = Locale.getDefault(); // print the default locale System.out.println("Locale:" + locale); }
From source file:Main.java
public static void main(String args[]) { Locale currentLocale = Locale.getDefault(); Locale locales[] = { Locale.TAIWAN, Locale.KOREA, Locale.ITALY, Locale.CANADA, Locale.CANADA_FRENCH }; System.out.println("CURRENT LOCALE:"); describeLocale(currentLocale);//from w w w .j av a 2s.c o m System.out.println("OTHER LOCALES:"); for (int i = 0; i < locales.length; ++i) describeLocale(locales[i]); }
From source file:Main.java
public static void main(String[] args) { Locale.setDefault(Locale.Category.FORMAT, Locale.getDefault()); }
From source file:DisplayNameOutput.java
public static void main(String[] argv) { Locale defaultLocale = Locale.getDefault(); System.out.println(defaultLocale.getDisplayName()); System.out.println(defaultLocale.getDisplayName(Locale.ITALIAN)); System.out.println(defaultLocale.getDisplayName(Locale.US)); }
From source file:DisplayCountryOutput.java
public static void main(String[] argv) { Locale defaultLocale = Locale.getDefault(); System.out.println(defaultLocale.getISO3Country()); System.out.println(defaultLocale.getDisplayCountry()); System.out.println(defaultLocale.getDisplayCountry(Locale.GERMAN)); }
From source file:DisplayVariantOutput.java
public static void main(String[] argv) { 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()); }
From source file:MainClass.java
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()); }
From source file:MainClass.java
public static void main(String args[]) throws Exception { Locale defaultLocale = Locale.getDefault(); System.out.println(defaultLocale.getDisplayName()); System.out.println(defaultLocale.getDisplayName(Locale.ITALIAN)); System.out.println(defaultLocale.getDisplayName(Locale.US)); }
From source file:Main.java
public static void main(String[] argv) throws Exception { // Get default locale Locale locale = Locale.getDefault(); }
From source file:Main.java
public static void main(String[] args) { String s = "java2s.com"; System.out.println(s.toUpperCase(Locale.getDefault())); }