Localizer update

This commit is contained in:
James 2016-09-15 09:05:49 -04:00
parent a2ffc6af05
commit 1db9f726f9
1 changed files with 7 additions and 1 deletions

View File

@ -39,13 +39,19 @@ public class HapiLocalizer {
private List<ResourceBundle> myBundle = new ArrayList<ResourceBundle>();
private final Map<String, MessageFormat> myKeyToMessageFormat = new ConcurrentHashMap<String, MessageFormat>();
private String[] myBundleNames;
public HapiLocalizer() {
this(HapiLocalizer.class.getPackage().getName() + ".hapi-messages");
}
public HapiLocalizer(String... theBundleNames) {
for (String nextName : theBundleNames) {
myBundleNames = theBundleNames;
init();
}
protected void init() {
for (String nextName : myBundleNames) {
myBundle.add(ResourceBundle.getBundle(nextName));
}
}