Package org.eweb4j.config.bean

Examples of org.eweb4j.config.bean.I18N


        && !"1".equals(cb.getDebug()) && !"0".equals(cb.getDebug())) {
      sb.append("当前您填写的:( debug=").append(cb.getDebug())
          .append(" )是错误的!它只能填写为:true|false|1|0 中的一种 ;").append("\n");
    }

    I18N i18n = cb.getLocales();
    StringBuilder locSB = new StringBuilder();
    for (java.util.Locale jl : java.util.Locale.getAvailableLocales()){
      if (locSB.length() > 0){
        locSB.append(", ");
      }
      locSB.append(jl.getLanguage());
      locSB.append("_").append(jl.getCountry());
    }
   
    if (i18n != null){
      for (Locale l : i18n.getLocale()){
        boolean flag = false;
        for (java.util.Locale jl : java.util.Locale.getAvailableLocales()){
          if(jl.getLanguage().equals(l.getLanguage()) || jl.getCountry().equals(l.getCountry())){
            flag = true;
          }
View Full Code Here


      return null;

    String id = f.getId();
    String path = f.getPath();
    ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class);
    I18N i18n = cb.getLocales();

    final String sufPro = ".properties";

    if (i18n != null) {
      for (Locale l : i18n.getLocale()) {

        String suffix1 = "_" + l.getLanguage() + "_" + l.getCountry();
        String tmpPath1 = path.replace(sufPro, suffix1 + sufPro);
        i18nIds.add(id);
        if (FileUtil.exists(ConfigConstant.CONFIG_BASE_PATH + tmpPath1)) {
View Full Code Here

  }
 
  public static ConfigBean getConfigBean() {
    ConfigBean configBean = new ConfigBean();
   
    I18N i18n = new I18N();
    Locale locale = new Locale();
    locale.setLanguage(java.util.Locale.CHINA.getLanguage());
    locale.setCountry(java.util.Locale.CHINA.getCountry());
    i18n.getLocale().add(locale);
    configBean.setLocales(i18n);
   
    Properties props = new Properties();
    Prop file = new Prop();
    props.getFile().add(file);
View Full Code Here

TOP

Related Classes of org.eweb4j.config.bean.I18N

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.