Package com.jpoweredcart.common.entity.localisation

Examples of com.jpoweredcart.common.entity.localisation.Language


  }
 
  @Override
  public String format(Number value, Integer languageId, Integer classId) {
   
    Language language = languageService.getById(languageId);
    NumberFormat numberFormat = null;
    if(language!=null && language.getLocale()!=null){
      numberFormat = NumberFormat.getInstance(language.getLocale());
    }else{
      numberFormat = NumberFormat.getInstance();
    }
    return numberFormat.format(value)+" "+getUnit(languageId, classId);
  }
View Full Code Here


  }
 
  @Override
  public String format(Number value, Integer languageId, Integer classId) {
   
    Language language = languageService.getById(languageId);
    NumberFormat numberFormat = null;
    if(language!=null && language.getLocale()!=null){
      numberFormat = NumberFormat.getInstance(language.getLocale());
    }else{
      numberFormat = NumberFormat.getInstance();
    }
    return numberFormat.format(value)+" "+getUnit(languageId, classId);
  }
View Full Code Here

      }
     
      Locale locale = StringUtils.parseLocaleString(langCode);
      localeResolver.setLocale(request, response, locale);
     
      Language language = languageService.getByCode(langCode);
      if(language!=null){
        userAttrs.setLanguageId(language.getId());
        locale = language.getLocale();
      }else{
        logger.warn("Language id not found for code: {}", langCode);
      }
    }
   
View Full Code Here

    return currencyMap.containsKey(code);
  }
 
  @Override
  public String format(BigDecimal number, String code, BigDecimal overrideRate, Integer languageId) {
    Language language = languageService.getById(languageId);
    return format(number, code, overrideRate, language.getLocale());
  }
View Full Code Here

TOP

Related Classes of com.jpoweredcart.common.entity.localisation.Language

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.