Exemplo n.º 1
0
 /**
  * ** Returns an I18N.Text instance used for lazy localization ** @param clazz The class from
  * which the package is derived ** @param key The localization key ** @param dft The default
  * localized text ** @return An I18N.Text instance used for lazy localization
  */
 public static I18N.Text getString(Class clazz, String key, String dft) {
   // i18n 'key' is separately specified
   String pkg = (clazz != null) ? clazz.getPackage().getName() : null;
   return I18N.parseText(pkg, key, dft);
 }
Exemplo n.º 2
0
 /**
  * ** Returns an I18N instance based on the specified package name and Locale ** @param pkgClz The
  * class from which the class package is derived ** @param loc The Locale resource from with the
  * localized text is loaded
  */
 public static I18N getI18N(Class pkgClz, Locale loc) {
   return I18N.getI18N(pkgClz.getPackage().getName(), loc);
 }
Exemplo n.º 3
0
 public Text(Class clazz, String key, String dft) {
   this.pkg = (clazz != null) ? clazz.getPackage().getName() : null;
   this.key = (key != null) ? key : "";
   this.dft = (dft != null) ? dft : "";
   // Print.logInfo("I18N Text: key=" + key + " default=" + dft);
 }