Changeset 9426
- Timestamp:
- 2005-03-15T14:44:28+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/ServiceRack.java
r9423 r9426 342 342 protected String getTextString(String key, String lang, String dictionary, String[] args) { 343 343 344 // we want to use the collection class loader in case there are coll specific files 345 CollectionClassLoader class_loader = new CollectionClassLoader(this.site_home, this.cluster_name); 346 344 347 if (dictionary != null) { 345 348 // just try the one specified dictionary 346 Dictionary dict = new Dictionary(dictionary, lang );349 Dictionary dict = new Dictionary(dictionary, lang, class_loader); 347 350 String result = dict.get(key, args); 348 351 if (result == null) { // not found … … 352 355 } 353 356 354 // If no dictionary was specified, we try collection specific one, then 355 // dictionaries based on the class names 356 357 // first we try a collection properties file 358 Dictionary dict = new Dictionary("collection", lang, new CollectionClassLoader(this.site_home, this.cluster_name)); 359 String result = dict.get(key, args); 360 if (result != null) { 361 return result; 362 } 363 364 // then we try class names for dictionary names 357 // now we try class names for dictionary names 365 358 String class_name = this.getClass().getName(); 366 359 class_name = class_name.substring(class_name.lastIndexOf('.')+1); 367 dict = new Dictionary(class_name, lang);368 result = dict.get(key, args);360 Dictionary dict = new Dictionary(class_name, lang, class_loader); 361 String result = dict.get(key, args); 369 362 if (result != null) { 370 363 return result; … … 380 373 break; 381 374 } 382 dict = new Dictionary(class_name, lang, new CollectionClassLoader(this.site_home, this.cluster_name));375 dict = new Dictionary(class_name, lang, class_loader); 383 376 result = dict.get(key, args); 384 377 c = c.getSuperclass();
Note:
See TracChangeset
for help on using the changeset viewer.