Changeset 1583 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2009-05-07T20:00:43+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r1169 r1583 6 6 import java.util.Comparator; 7 7 import java.util.Locale; 8 import java.util.LinkedList; 8 9 import java.util.Vector; 9 10 … … 58 59 public static final Locale[] getAvailableTranslations() { 59 60 Vector<Locale> v = new Vector<Locale>(); 61 LinkedList<String>str = new LinkedList<String>(); 60 62 Locale[] l = Locale.getAvailableLocales(); 61 63 for (int i = 0; i < l.length; i++) { 62 String cn = TR_BASE + l[i]; 64 String loc = l[i].toString(); 65 String cn = TR_BASE + loc; 63 66 try { 64 67 Class.forName(cn); 65 68 v.add(l[i]); 69 str.add(loc); 66 70 } catch (ClassNotFoundException e) { 67 71 } 68 72 } 73 /* hmm, don't know why this is necessary */ 74 try { 75 if(!str.contains("nb")) 76 v.add(new Locale("nb")); 77 } catch (Exception e) {} 78 try { 79 if(!str.contains("gl")) 80 v.add(new Locale("gl")); 81 } catch (Exception e) {} 69 82 l = new Locale[v.size()]; 70 83 l = v.toArray(l);
Note:
See TracChangeset
for help on using the changeset viewer.