Ejemplo n.º 1
0
 public String getLocale() {
   if (request.getLocale().getCountry() == null
       || request.getLocale().getCountry().trim().isEmpty()) {
     return String.format("%s", request.getLocale().getLanguage());
   } else {
     return String.format(
         "%s-%s", request.getLocale().getLanguage(), request.getLocale().getCountry());
   }
 }
Ejemplo n.º 2
0
 private String getFormatedValue() {
   try {
     java.text.NumberFormat numberFormat =
         new DecimalFormat(mask, new DecimalFormatSymbols(request.getLocale()));
     return numberFormat.format(value);
   } catch (Exception e) {
     logger.error(e.getLocalizedMessage());
     return value.toString();
   }
 }