1 24 25 package org.objectweb.cjdbc.common.i18n; 26 27 import java.util.MissingResourceException ; 28 import java.util.ResourceBundle ; 29 30 37 38 public final class Translate extends I18N 39 { 40 43 public static final String CJDBC_LANGUAGE_FILE = "c-jdbc-language"; 44 45 48 public static ResourceBundle bundle; 49 50 static 51 { 52 try 53 { 54 bundle = ResourceBundle.getBundle(CJDBC_LANGUAGE_FILE); 55 } 56 catch (MissingResourceException e) 57 { 58 e.printStackTrace(); 59 } 60 } 61 62 67 public static String get(String key) 68 { 69 return get(bundle, key); 70 } 71 72 78 public static String get(String key, boolean parameter) 79 { 80 return get(bundle, key, parameter); 81 } 82 83 89 public static String get(String key, int parameter) 90 { 91 return get(bundle, key, parameter); 92 } 93 94 100 public static String get(String key, long parameter) 101 { 102 return get(bundle, key, parameter); 103 } 104 105 111 public static String get(String key, Object [] parameters) 112 { 113 return get(bundle, key, parameters); 114 } 115 116 122 public static String get(String key, Object parameter) 123 { 124 return get(bundle, key, parameter); 125 } 126 } | Popular Tags |