List of usage examples for java.util ResourceBundle getObject
public final Object getObject(String key)
From source file:org.vosao.i18n.VosaoResourceBundle.java
@Override protected Object handleGetObject(String key) { Object result = null;//from w w w.jav a2s. com for (ResourceBundle bundle : getResourceBundles()) { try { result = bundle.getObject(key); } catch (MissingResourceException e) { } if (result != null) { return result; } } return "_" + key + "_"; }
From source file:pt.ist.expenditureTrackingSystem.domain.acquisitions.Financer.java
protected String getAllocationIds(final String id, final String key) { final ResourceBundle resourceBundle = ResourceBundle.getBundle("resources.AcquisitionResources", I18N.getLocale());/* w w w. j a va 2 s . com*/ final StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append('['); stringBuilder.append(resourceBundle.getObject(key)); stringBuilder.append(' '); stringBuilder.append(id == null || id.isEmpty() ? "-" : id); stringBuilder.append(']'); return stringBuilder.toString(); }