コード例 #1
0
 /**
  * Use this method to get the locale specific value for a key
  *
  * @param property
  * @return locale specific value for a key
  */
 public static String get(String property) {
   Properties p = TranslationProvider.getTranslationProvider().properties;
   if (p == null) {
     return property;
   }
   String localvalue = p.getProperty(property, "");
   if (!localvalue.isEmpty()) {
     return localvalue;
   } else {
     TranslationProvider tp = TranslationProvider.getDefaultTranslationProvider();
     Properties p1 = tp.properties;
     String ret = p1.getProperty(property);
     /*if(ret==null){ return "<null>"+property; }*/
     return ret;
   }
 }
コード例 #2
0
 /**
  * @param property
  * @return value for a key in default ENGLISH
  */
 public static String getDefault(String property) {
   return TranslationProvider.getDefaultTranslationProvider().properties.getProperty(property, "");
 }