Changeset 4702
- Timestamp:
- 2003-06-18T11:54:54+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java
r4271 r4702 1 1 package org.greenstone.gsdl3.util; 2 2 3 /** a class to contain static methods that are used by the xslt3 /** a class to contain various static methods that are used by the xslt 4 4 * stylesheets 5 5 */ … … 22 22 } 23 23 24 public static int getInt(String orig) {25 return 20;26 }27 28 public static String getString(String orig) {29 return orig;30 }31 32 24 public static String getNumberedItem(String list, int number) { 33 25 String [] items = list.split(",", -1); … … 47 39 return new_s; 48 40 } 41 42 43 public static String getInterfaceText(String interface_name, String lang, String key) { 44 return getInterfaceText(interface_name, lang, key, null); 45 } 46 public static String getInterfaceText(String interface_name, String lang, String key, String args_str) { 47 String [] args = null; 48 if (args_str!=null && !args_str.equals("")) { 49 args = args_str.split(";"); 50 } 51 Dictionary dict = new Dictionary("interface_"+interface_name, lang); 52 String result = dict.get(key, args); 53 54 if (result == null && !interface_name.equals("default")) { // not found, try the default interface 55 dict = new Dictionary("interface_default", lang); 56 result = dict.get(key, args); 57 } 58 59 if (result == null) { // not found 60 return "_"+key+"_"; 61 } 62 return result; 63 } 49 64 } 65
Note:
See TracChangeset
for help on using the changeset viewer.