diff options
Diffstat (limited to 'BKUApplet/src/main')
-rw-r--r-- | BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletHelpListener.java | 3 | ||||
-rw-r--r-- | BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletHelpListener.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletHelpListener.java index a0305eb4..4040431f 100644 --- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletHelpListener.java +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletHelpListener.java @@ -20,6 +20,7 @@ package at.gv.egiz.bku.online.applet; import at.gv.egiz.bku.gui.AbstractHelpListener; import java.applet.AppletContext; import java.net.URL; +import java.util.Locale; /** * @@ -29,7 +30,7 @@ public class AppletHelpListener extends AbstractHelpListener { protected AppletContext ctx; - public AppletHelpListener(AppletContext ctx, URL helpURL, String locale) { + public AppletHelpListener(AppletContext ctx, URL helpURL, Locale locale) { super(helpURL, locale); if (ctx == null) { throw new RuntimeException("no applet context provided"); diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java index 2b0188bb..50d66d80 100644 --- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java @@ -65,9 +65,11 @@ public class BKUApplet extends JApplet { log.debug("Called init()"); HttpsURLConnection.setDefaultSSLSocketFactory(InternalSSLSocketFactory.getInstance()); String localeString = getMyAppletParameter(LOCALE_PARAM_KEY); + Locale locale = null; if (localeString != null) { + locale = new Locale(localeString); resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE, - new Locale(localeString)); + locale); } else { resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE); } @@ -85,7 +87,7 @@ public class BKUApplet extends JApplet { AppletHelpListener helpListener = null; try { URL helpURL = getMyAppletParameterURL(HELP_URL); - helpListener = new AppletHelpListener(getAppletContext(), helpURL, localeString); + helpListener = new AppletHelpListener(getAppletContext(), helpURL, locale); } catch (MalformedURLException ex) { log.error("invalid help URL: " + ex.getMessage()); } |