diff --git a/source/org/thdl/util/ThdlI18n.java b/source/org/thdl/util/ThdlI18n.java new file mode 100644 index 0000000..b78f3d6 --- /dev/null +++ b/source/org/thdl/util/ThdlI18n.java @@ -0,0 +1,32 @@ +package org.thdl.util; + +import java.util.Locale; +import java.util.ResourceBundle; +import javax.swing.JComponent; + +public class ThdlI18n { + private static Locale locale = null; + private static ResourceBundle resources = null; + + private ThdlI18n() {} + + public static ResourceBundle getResourceBundle() { + if (resources == null) + resources = ResourceBundle.getBundle("MessageBundle", getLocale()); + return resources; + } + public static void setLocale(Locale l) { + Locale[] locales = Locale.getAvailableLocales(); + for (int k=0; k