KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > thinlet > drafts > Internationalization


1 package thinlet.drafts;
2
3 import java.util.*;
4 import thinlet.*;
5
6 /**
7  *
8  */

9 public class Internationalization {
10     
11     /**
12      *
13      */

14     public void update(Thinlet thinlet, Object JavaDoc combobox, int selected, Object JavaDoc panel) throws Exception JavaDoc {
15         String JavaDoc locale = (String JavaDoc) thinlet.getProperty(thinlet.getItem(combobox, selected), "locale");
16         ResourceBundle bundle = ResourceBundle.getBundle("thinlet.drafts.i18n", new Locale(locale, "", ""));
17         
18         thinlet.setResourceBundle(bundle);
19         thinlet.add(panel, thinlet.parse("i18npanel.xml"));
20         thinlet.setResourceBundle(null);
21     }
22 }
Popular Tags