Examples of IResourceBundle


Examples of org.sf.bee.commons.i18n.resourcebundle.IResourceBundle

    private static String getResourceString(final String baseName,
            final String resourceKey, final Locale locale,
            final String defaultValue, final ClassLoader classloader) {
        try {
            // retrieve a resource bundle
            IResourceBundle rb = ResourceBundleFactory.getBundle(baseName,
                    locale,
                    classloader);

            final String result = rb.getString(resourceKey);
            return result != null ? result : defaultValue;
        } catch (Exception ex) {
            getLogger().log(Level.FINE,
                    String.format("Resource not found. BaseName='%s'; "
                    + "Key='%s'; Locale='%s'",
View Full Code Here

Examples of org.sf.bee.commons.i18n.resourcebundle.IResourceBundle

    }

    private static Properties getAllProperties(final String baseName,
            final Locale locale, final ClassLoader classloader) throws Exception {
        // retrieve a resource bundle
        final IResourceBundle rb = ResourceBundleFactory.getBundle(baseName,
                locale,
                classloader);

        return rb != null
                ? rb.getProperties()
                : null;
    }
View Full Code Here

Examples of org.sf.bee.commons.i18n.resourcebundle.IResourceBundle

        super.finalize();
    }
   
    public String getResourceFromCache(String cachekey, String resourceKey){
        synchronized (_resourceBunbleCache ){
            IResourceBundle rb = _resourceBunbleCache.get(cachekey);
            if (null==rb)
                return null;
           
            return rb.getString(resourceKey);
        }
    }
View Full Code Here

Examples of org.telluriumsource.crosscut.i18n.IResourceBundle

        if(original == null || prefix == null)
            return original;
        if(original.startsWith(prefix)){
            return original.substring(prefix.length());
        }
        IResourceBundle i18nBundle = new ResourceBundle();
        throw new RuntimeException(i18nBundle.getMessage("XPathMatcher.RunTimeException" , new Object[] {original , prefix}));
    }
View Full Code Here

Examples of org.telluriumsource.crosscut.i18n.IResourceBundle

            }

            tree.printUI();
        } catch (FileNotFoundException e) {
          IResourceBundle i18nBundle = new ResourceBundle();
          System.out.println(i18nBundle.getMessage("UIParser.FileNotFoundException" , new Object[]{filename}));
        }
    }
View Full Code Here

Examples of org.telluriumsource.crosscut.i18n.IResourceBundle

    public static void main(String[] args){
       if(args != null && args.length == 1){
           UiParser parser = new UiParser();
           parser.parseFile(args[0]);
       }else{
           IResourceBundle i18nBundle = new ResourceBundle();
           System.out.println(i18nBundle.getMessage("UIParser.Usage" ));

       }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.