61 |
public static final String LOCALECHANGE_PROPERTY = "localechange"; |
public static final String LOCALECHANGE_PROPERTY = "localechange"; |
62 |
public static final String NO_TRANSLATION = "NO TRANSLATION"; |
public static final String NO_TRANSLATION = "NO TRANSLATION"; |
63 |
public static final String DEFAULT_KEY = "default"; |
public static final String DEFAULT_KEY = "default"; |
64 |
static final Logger log = Logger.getLogger(Translation.class); |
static final Logger LOGGER = Logger.getLogger(Translation.class); |
65 |
static String activeLang = Locale.getDefault().getLanguage(); |
static String activeLang = Locale.getDefault().getLanguage(); |
66 |
|
|
67 |
static protected List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>(); |
static protected List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>(); |
143 |
|
|
144 |
fireLocaleChangeEvents(); |
fireLocaleChangeEvents(); |
145 |
|
|
146 |
log.info("skrueger.i8n.Translation switched ActiveLang to " + newLang); |
LOGGER.info("skrueger.i8n.Translation switched ActiveLang to " + newLang); |
147 |
} |
} |
148 |
|
|
149 |
/** |
/** |
228 |
eatUp = eatUp.substring(eatUp.indexOf("}") + 1); |
eatUp = eatUp.substring(eatUp.indexOf("}") + 1); |
229 |
} |
} |
230 |
} catch (Exception e) { |
} catch (Exception e) { |
231 |
log.warn("Error while reading the oneLineCode '" + oneLineCoded |
LOGGER.warn("Error while reading the oneLineCode '" + oneLineCoded |
232 |
+ "'", e); |
+ "'", e); |
233 |
log.warn("Translation will be empty!"); |
LOGGER.warn("Translation will be empty!"); |
234 |
} |
} |
235 |
} |
} |
236 |
|
|
312 |
* reference as long as you need the listener. |
* reference as long as you need the listener. |
313 |
*/ |
*/ |
314 |
public void addTranslationChangeListener(ActionListener actionListener) { |
public void addTranslationChangeListener(ActionListener actionListener) { |
315 |
actionListeners.add(actionListener); |
if (actionListeners.add(actionListener)) { |
316 |
|
LOGGER.debug("registering a new translationChangeActionListener in the WeakHashSet"); |
317 |
|
} |
318 |
} |
} |
319 |
|
|
320 |
/** |
/** |