List of usage examples for java.util Locale FRENCH
Locale FRENCH
To view the source code for java.util Locale FRENCH.
Click Source Link
From source file:Main.java
public static void main(String[] args) { Locale locale = Locale.FRENCH; System.out.println("Locale1:" + locale); // print the country of this locale System.out.println("Country:" + locale.getCountry()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { Locale.setDefault(Locale.FRENCH); }
From source file:Main.java
public static void main(String[] args) { Collator collator = Collator.getInstance(Locale.FRENCH); collator.setStrength(Collator.PRIMARY); if (collator.compare("d?b?rqu?r", "debarquer") == 0) { System.out.println("Both Strings are equal"); } else {/*ww w. j a v a 2 s.c o m*/ System.out.println("Both Strings are not equal"); } }
From source file:Main.java
public static void main(String[] argv) throws Exception { Locale locale = Locale.FRENCH; // Format with a custom format DateFormat formatter = new SimpleDateFormat("E, dd MMM yyyy", locale); String s = formatter.format(new Date()); }
From source file:Main.java
public static void main(String[] argv) throws Exception { Locale locale = Locale.FRENCH; DateFormat formatter = new SimpleDateFormat("HH:mm:ss zzzz", locale); String s = formatter.format(new Date()); System.out.println(s);/*from w ww . ja v a 2 s .c o m*/ }
From source file:MainClass.java
public static void main(String args[]) { DateFormatSymbols symbols = new DateFormatSymbols(Locale.FRENCH); String days[] = symbols.getWeekdays(); for (int i = 0; i < days.length; i++) { System.out.println(days[i]); }/*from ww w.jav a2s . c om*/ }
From source file:PrintfExamples.java
public static void main(String[] args) { System.out.printf(Locale.ITALIAN, "The date is %tc\n", new Date()); System.out.printf(Locale.CHINA, "The date is %tc\n", new Date()); System.out.printf(Locale.FRENCH, "The date is %tc\n", new Date()); System.out.printf(Locale.GERMAN, "The date is %tc\n", new Date()); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime zonedDateTime = ZonedDateTime.of(2013, 1, 19, 0, 0, 0, 0, ZoneId.of("Europe/Paris")); DateTimeFormatter longDateTimeFormatter = DateTimeFormatter .ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.FULL).withLocale(Locale.FRENCH); System.out.println(longDateTimeFormatter.getLocale()); // fr System.out.println(longDateTimeFormatter.format(zonedDateTime)); }
From source file:MainClass.java
public static void main(String args[]) { JFrame f = new JFrame("JSpinner Sample"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); DateFormatSymbols symbols = new DateFormatSymbols(Locale.FRENCH); String days[] = symbols.getWeekdays(); SpinnerModel model1 = new SpinnerListModel(days); SpinnerModel model2 = new SpinnerDateModel(); JSpinner spinner1 = new JSpinner(model1); JSpinner spinner2 = new JSpinner(model2); f.add(spinner1, BorderLayout.NORTH); f.add(spinner2, BorderLayout.SOUTH); f.setSize(300, 100);/*from w w w. j ava 2s . c om*/ f.setVisible(true); }
From source file:Main.java
public static void main(String args[]) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); DateFormatSymbols symbols = new DateFormatSymbols(Locale.FRENCH); String days[] = symbols.getWeekdays(); SpinnerModel model1 = new SpinnerListModel(days); JSpinner spinner1 = new JSpinner(model1); JLabel label1 = new JLabel("French Days/List"); JPanel panel1 = new JPanel(new BorderLayout()); panel1.add(label1, BorderLayout.WEST); panel1.add(spinner1, BorderLayout.CENTER); frame.add(panel1, BorderLayout.NORTH); frame.setSize(200, 90);//from ww w.j a v a 2s. c om frame.setVisible(true); }