Code example for PropertyResourceBundle

Methods: handleGetObjectgetLocale

0
		 *  
		 * @see java.util.ResourceBundle#handleGetObject(java.lang.String) 
		 */ 
		protected Object handleGetObject(String key) {
			try { 
				String value = (String) bundle.handleGetObject(key);
				return new String(value.getBytes("ISO-8859-1"), "UTF-8");
			} catch (Exception e) {
				log.warn("value for key " + key + " not found in bundle " + bundle.getLocale().getLanguage());
				return "{" + key + "}_" + bundle.getLocale().getLanguage();
			} 
		} 
 
	} 
}