1 16 package api.cintoo.messages; 17 18 import api.cintoo.messages.bundle.BundleManager; 19 import api.cintoo.messages.context.Context; 20 21 import java.util.Locale ; 22 import java.util.ResourceBundle ; 23 24 33 public interface MessageHandler { 34 40 public void setThreadLocale(String language); 41 42 49 public void setThreadLocale(String language, String country); 50 51 57 public void setThreadLocale(Locale locale); 58 59 67 public void setThreadLocale(String language, String country, String variant); 68 69 74 public void setLocale(String language); 75 76 82 public void setLocale(String language, String country); 83 84 91 public void setLocale(String language, String country, String variant); 92 93 98 public void setLocale(Locale locale); 99 100 105 public Locale getLocale(); 106 107 112 public void setBundle(String bundleName); 113 114 120 public void setBundle(String bundleName, String packageName); 121 122 128 public void setBundle(String bundleName, Context context); 129 130 public String format(Object context, String key); 131 132 public String format(String key); 133 134 public String format(Object context, String key, Object arg); 135 136 public String format(String key, Object arg); 137 138 public String format(Object context, String key, Object ... args); 139 140 public String format(String key, Object ... args); 141 142 147 public ResourceBundle getBundle(); 148 149 155 public ResourceBundle getBundle(Object context); 156 157 public void setBundleManager(BundleManager manager); 158 159 public void clear(); 160 } 161 | Popular Tags |