/[schmitzm]/trunk/src/skrueger/i8n/I8NUtil.java
ViewVC logotype

Contents of /trunk/src/skrueger/i8n/I8NUtil.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Tue Feb 24 22:43:52 2009 UTC (16 years ago) by mojays
File size: 1180 byte(s)
First Commit, corresponds to Revision 1008 of Wikisquare-SVN
includes:
- schmitzm.* (except schmitzm.test)
- org.geotools.* (all overridden classes)
- skrueger.geotools
- skrueger.i8n
- skrueger.swing
- appl.data.LateLoadable (dependency in SCHMITZM)
- appl.data.LoadingException (dependency in SCHMITZM)
- appl.util.RasterMetaData (dependency in SCHMITZM)

1 package skrueger.i8n;
2
3 import java.util.LinkedList;
4 import java.util.List;
5
6 public class I8NUtil {
7
8 public static List<String> languageCodes = new LinkedList<String>();
9 static {
10 for (String code : java.util.Locale.getISOLanguages()) {
11 languageCodes.add(code);
12 }
13 }
14 //
15 // /**
16 // * @Returns an ImageIcon for a given ISO code or null.
17 // * @param code ISO Country Code
18 // */
19 // public static ImageIcon getFlagIcon(String code) {
20 //
21 // String ressourcename = "resource/flags/" + code.toUpperCase() + ".gif";
22 //
23 // URL resourceURL = TranslationEditJPanel.class.getResource(ressourcename);
24 //
25 // if (resourceURL != null)
26 // return new ImageIcon( resourceURL);
27 //
28 // return new ImageIcon();
29 // }
30 //
31 // /**
32 // * @Returns an {@link ImageIcon} flag for the language setup as Translation language
33 // */
34 // public static ImageIcon getFlagIcon() {
35 // return getFlagIcon( Translation.getActiveLang() );
36 // }
37
38
39 /**
40 * @author Stefan Alfons Krüger
41 * @param code
42 * @return true if the code paramter is a valid ISO Language code
43 */
44 public static boolean isValidISOLangCode(String code) {
45 return languageCodes.contains(code);
46 }
47 }
48

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26