From fa0c705fd1174acfdf006212663ad4cabdb83a6a Mon Sep 17 00:00:00 2001 From: philippe lhardy Date: Sat, 18 Nov 2017 22:00:26 +0100 Subject: [PATCH] uses default locale only french and english supported --- java/org/artisanlogiciel/games/Display.java | 4 +++- lang/LabelsBundle.properties | 11 +++++++++++ lang/LabelsBundle_fr.properties | 22 ++++++++++----------- 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 lang/LabelsBundle.properties diff --git a/java/org/artisanlogiciel/games/Display.java b/java/org/artisanlogiciel/games/Display.java index 8864592..85894c4 100644 --- a/java/org/artisanlogiciel/games/Display.java +++ b/java/org/artisanlogiciel/games/Display.java @@ -49,7 +49,7 @@ public class Display extends JFrame // to please eclipse, not supposed to be serialized private static final long serialVersionUID = 8500214871372184418L; - final static ResourceBundle labels = ResourceBundle.getBundle("LabelsBundle", Locale.FRENCH, Display.class.getClassLoader(), new UTF8Control()); + final static ResourceBundle labels = ResourceBundle.getBundle("LabelsBundle", Locale.getDefault(), Display.class.getClassLoader(), new UTF8Control()); MazeComponent maze; MazeControler controler; @@ -841,6 +841,8 @@ public class Display extends JFrame int W = 600; int H = 400; + System.out.println("Default Locale " + Locale.getDefault()); + if ( (pArgs.length > 0) && (pArgs[0].length() > 0)) { try diff --git a/lang/LabelsBundle.properties b/lang/LabelsBundle.properties new file mode 100644 index 0000000..4d64dff --- /dev/null +++ b/lang/LabelsBundle.properties @@ -0,0 +1,11 @@ +width = Width +height = Height +depth = Depth +north = North +south = South +east = East +west = West +resolve = Resolve +create = Create +save = Save +quit = Quit \ No newline at end of file diff --git a/lang/LabelsBundle_fr.properties b/lang/LabelsBundle_fr.properties index 635bf8a..e0f4637 100644 --- a/lang/LabelsBundle_fr.properties +++ b/lang/LabelsBundle_fr.properties @@ -1,11 +1,11 @@ -width = largeur -height = hauteur -depth = profondeur -north = nord -south = sud -east = est -west = ouest -resolve = résoudre -create = créer -save = sauver -quit = quitter \ No newline at end of file +width = Largeur +height = Hauteur +depth = Profondeur +north = Nord +south = Sud +east = Est +west = Ouest +resolve = Résoudre +create = Créer +save = Sauver +quit = Quitter \ No newline at end of file