From e4b8cec0f43af3aa4272e56e8133cc70512149a2 Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 2 Jun 2010 15:04:20 +0000 Subject: default locale: en, help pages fixed git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@748 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'BKUApplet/src/main/java/at/gv') 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 7873b263..9344181a 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 @@ -38,7 +38,6 @@ import org.slf4j.LoggerFactory; import at.gv.egiz.bku.gui.BKUGUIFacade; import at.gv.egiz.bku.gui.BKUGUIImpl; -import at.gv.egiz.bku.gui.DeafHelpListener; import at.gv.egiz.bku.gui.HelpListener; import at.gv.egiz.bku.gui.viewer.FontProvider; import at.gv.egiz.stal.service.STALPortType; @@ -155,11 +154,14 @@ public class BKUApplet extends JApplet { HttpsURLConnection.setDefaultSSLSocketFactory(InternalSSLSocketFactory.getInstance()); String locale = getParameter(LOCALE); + log.trace("requested locale: {}, jvm default locale: {}", locale, Locale.getDefault()); if (locale != null) { + if (locale.indexOf('_') > 0) { + locale = locale.substring(0, locale.indexOf('_')); + } this.setLocale(new Locale(locale)); } - log.trace("Default locale: {}.", Locale.getDefault()); - log.debug("Applet locale set to: {}.", getLocale()); + log.trace("Applet locale set to: {} (will be used as a hint for resource bundle loading).", getLocale()); if (Boolean.parseBoolean(getParameter(ENFORCE_RECOMMENDED_PIN_LENGTH))) { SignatureCardFactory.ENFORCE_RECOMMENDED_PIN_LENGTH = true; @@ -185,7 +187,7 @@ public class BKUApplet extends JApplet { log.warn("Cannot load applet background image. {}", ex.getMessage()); } - helpListener = new DeafHelpListener(getParameter(HELP_URL), getLocale()); + helpListener = new HelpListener(getParameter(HELP_URL), getLocale()); SwitchFocusListener switchFocusListener = new SwitchFocusListener( getAppletContext(), "focusToBrowser"); -- cgit v1.2.3