Skip to content

Commit

Permalink
Localizer update
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesagnew committed Sep 15, 2016
1 parent a2ffc6a commit 1db9f72
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Expand Down

0 comments on commit 1db9f72

Please sign in to comment.