Package org.papoose.core

Examples of org.papoose.core.L18nResourceBundle


        try
        {
            String path = "org/papoose/core/mock/bundle";
            path += (locale != null ? "_" + locale : "") + ".properties";
            InputStream in = MockArchiveStore.class.getClassLoader().getResourceAsStream(path);
            if (in != null) return new L18nResourceBundle(in);
        }
        catch (IOException ioe)
        {
        }
        return null;
View Full Code Here


        {
            String path = this.getBundleLocalization();
            if (path == null) path = "OSGI-INF/l10n/bundle";
            path += (locale != null ? "_" + locale : "") + ".properties";
            ZipEntry entry = getZipEntry(path);
            if (entry != null) return new L18nResourceBundle(getInputStream(entry));
        }
        catch (IOException ioe)
        {
        }
        return null;
View Full Code Here

        {
            String path = this.getBundleLocalization();
            if (path == null) path = "OSGI-INF/l10n/bundle";
            path += (locale != null ? "_" + locale : "") + ".properties";
            JarEntry entry = archive.getJarEntry(path);
            if (entry != null) return new L18nResourceBundle(archive.getInputStream(entry));
        }
        catch (IOException ioe)
        {
        }
        return null;
View Full Code Here

     * @param locale the locale to use to attempt to obtain the resource bundle
     * @return the resource bundle if one is found, else parent
     */
    public static L18nResourceBundle loadResourceBundle(ArchiveStore store, L18nResourceBundle parent, Locale locale)
    {
        L18nResourceBundle resourceBundle = store.getResourceBundle(locale);
        if (resourceBundle != null)
        {
            resourceBundle.setParent(parent);
            return resourceBundle;
        }
        else
        {
            return parent;
View Full Code Here

TOP

Related Classes of org.papoose.core.L18nResourceBundle

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.