Package org.uengine.util.resources

Examples of org.uengine.util.resources.PropertyResourceBundle


     
      key = key.replaceAll("_", " ");
     
      if (!webMessageBundles.containsKey(language)) {
        Locale locale = new Locale(language);
        PropertyResourceBundle propertyResourceBundle = (PropertyResourceBundle) PropertyResourceBundle.getBundle("org.uengine.messages", locale, GlobalContext.getClassLoader());
       
        if (!propertyResourceBundle.getLocale().getLanguage().equals(language)) return key;
       
        webMessageBundles.put(language, propertyResourceBundle);
      }
      ResourceBundle webMessageBundle = (ResourceBundle) webMessageBundles.get(language);
     
View Full Code Here


 
  public static final String getLocalizedMessageForWeb(String key, String language, String defaultValue) {
    try{
      if(!webMessageBundles.containsKey(language)){
        Locale locale = new Locale(language);
        PropertyResourceBundle propertyResourceBundle = (PropertyResourceBundle) PropertyResourceBundle.getBundle("org.uengine.messages", locale, GlobalContext.getClassLoader());
       
        if(!propertyResourceBundle.getLocale().getLanguage().equals(language)) return defaultValue;
       
        webMessageBundles.put(language, propertyResourceBundle);
      }
      ResourceBundle webMessageBundle = (ResourceBundle) webMessageBundles.get(language);
     
View Full Code Here

TOP

Related Classes of org.uengine.util.resources.PropertyResourceBundle

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.