- Timestamp:
- 2008-12-26T14:32:56+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/branches/rtl-gli/src/org/greenstone/gatherer/Dictionary.java
r12295 r18296 37 37 package org.greenstone.gatherer; 38 38 39 import java.awt.ComponentOrientation; 39 40 import javax.swing.plaf.FontUIResource; 40 41 import java.util.HashMap; … … 74 75 Loaded from a file named "dictionary<I>locale</I>.properties. */ 75 76 static private ResourceBundle dictionary = null; 76 77 77 /** language orientation property */ 78 static private ComponentOrientation orientation = null; 79 78 80 public Dictionary(Locale locale, FontUIResource font) 79 81 { … … 84 86 this.locale = ((locale == null) ? Locale.getDefault() : locale); 85 87 this.dictionary = ResourceBundle.getBundle("dictionary", this.locale); 86 } 87 88 88 if (this.get("Component.Orientation").equals("RTL")){ 89 this.orientation = ComponentOrientation.RIGHT_TO_LEFT; 90 } else { 91 this.orientation = ComponentOrientation.LEFT_TO_RIGHT; 92 } 93 94 } 95 89 96 /** Retrieve the two letter code of the current language we are using, according to the stored locale. 90 97 * @return A <strong>String</strong> containing the two letter ISO639 language code. … … 94 101 return locale.getLanguage(); 95 102 } 96 97 103 /** returns the Components Orientation for use with right to left languages 104 * @return A <strong>ComponentOrientation</strong> with the current 105 dictionary's language orientation. 106 * by Amin Hejazi 107 */ 108 static public ComponentOrientation getOrientation() 109 { 110 return orientation; 111 } 112 98 113 static public String get(String key) 99 114 { 100 115 return get(key, (String[]) null); 101 116 } 102 103 117 104 118 static public String get(String key, String arg)
Note:
See TracChangeset
for help on using the changeset viewer.