Localizer update
This commit is contained in:
parent
a2ffc6af05
commit
1db9f726f9
|
@ -39,13 +39,19 @@ public class HapiLocalizer {
|
||||||
private List<ResourceBundle> myBundle = new ArrayList<ResourceBundle>();
|
private List<ResourceBundle> myBundle = new ArrayList<ResourceBundle>();
|
||||||
|
|
||||||
private final Map<String, MessageFormat> myKeyToMessageFormat = new ConcurrentHashMap<String, MessageFormat>();
|
private final Map<String, MessageFormat> myKeyToMessageFormat = new ConcurrentHashMap<String, MessageFormat>();
|
||||||
|
private String[] myBundleNames;
|
||||||
|
|
||||||
public HapiLocalizer() {
|
public HapiLocalizer() {
|
||||||
this(HapiLocalizer.class.getPackage().getName() + ".hapi-messages");
|
this(HapiLocalizer.class.getPackage().getName() + ".hapi-messages");
|
||||||
}
|
}
|
||||||
|
|
||||||
public HapiLocalizer(String... theBundleNames) {
|
public HapiLocalizer(String... theBundleNames) {
|
||||||
for (String nextName : theBundleNames) {
|
myBundleNames = theBundleNames;
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void init() {
|
||||||
|
for (String nextName : myBundleNames) {
|
||||||
myBundle.add(ResourceBundle.getBundle(nextName));
|
myBundle.add(ResourceBundle.getBundle(nextName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue