/** * Get resource bundle for specific class. * * @param clazz the class for which resource bundle should be found * @param locale the {@link Locale} object * @return Resource bundle */ public static final ResourceBundle loadRB(Class<?> clazz, Locale locale) { String pkg = WebcamUtils.class.getPackage().getName().replaceAll("\\.", "/"); return PropertyResourceBundle.getBundle(String.format("%s/i18n/%s", pkg, clazz.getSimpleName())); } }
entities = PropertyResourceBundle.getBundle(entitiesResource); } catch (Exception e) {}
BasePropertyHandler.getProperty( "Default_UI_Properties_Resource", "org.pentaho.di.ui.core.default" ); try { ResourceBundle bundle = PropertyResourceBundle.getBundle( prop ); if ( bundle != null ) { Enumeration<String> enumer = bundle.getKeys();
Console console = JCommander.getConsole(); ResourceBundle cliBundle = PropertyResourceBundle.getBundle("CliMessages"); final CliConfig cliConfig = new CliConfig(); @SuppressWarnings("checkstyle:LocalVariableName")
public I18NSupport(String name, Locale locale) { this.name = name; this.bundle = PropertyResourceBundle.getBundle(name, locale); }
public PropertyResourceBundleConverter(String baseName, Locale locale) { super(String.class, String.class); bundle = PropertyResourceBundle.getBundle(baseName, locale, control); }
public void loadPlugin(PluginDescriptor pluginDescriptor) { ResourceBundle bundle = PropertyResourceBundle.getBundle("d"); } }
/** * Initialize Message Formatter. */ public static void init() { if (locale != null) { domResourceBundle = PropertyResourceBundle.getBundle("org.apache.jackrabbit.vault.fs.util.xml.apache.xerces.internal.impl.msg.DOMMessages", locale); serResourceBundle = PropertyResourceBundle.getBundle("org.apache.jackrabbit.vault.fs.util.xml.apache.xerces.internal.impl.msg.XMLSerializerMessages", locale); xmlResourceBundle = PropertyResourceBundle.getBundle("org.apache.jackrabbit.vault.fs.util.xml.apache.xerces.internal.impl.msg.XMLMessages", locale); } else { domResourceBundle = PropertyResourceBundle.getBundle("org.apache.jackrabbit.vault.fs.util.xml.apache.xerces.internal.impl.msg.DOMMessages"); serResourceBundle = PropertyResourceBundle.getBundle("org.apache.jackrabbit.vault.fs.util.xml.apache.xerces.internal.impl.msg.XMLSerializerMessages"); xmlResourceBundle = PropertyResourceBundle.getBundle("org.apache.jackrabbit.vault.fs.util.xml.apache.xerces.internal.impl.msg.XMLMessages"); } }
/** * Initialize Message Formatter. */ public static void init(){ if (locale != null) { domResourceBundle = PropertyResourceBundle.getBundle("com.sun.org.apache.xerces.internal.impl.msg.DOMMessages", locale); serResourceBundle = PropertyResourceBundle.getBundle("com.sun.org.apache.xerces.internal.impl.msg.XMLSerializerMessages", locale); xmlResourceBundle = PropertyResourceBundle.getBundle("com.sun.org.apache.xerces.internal.impl.msg.XMLMessages", locale); }else{ domResourceBundle = PropertyResourceBundle.getBundle("com.sun.org.apache.xerces.internal.impl.msg.DOMMessages"); serResourceBundle = PropertyResourceBundle.getBundle("com.sun.org.apache.xerces.internal.impl.msg.XMLSerializerMessages"); xmlResourceBundle = PropertyResourceBundle.getBundle("com.sun.org.apache.xerces.internal.impl.msg.XMLMessages"); } }
/** * Adds a resource bundle. This may throw a MissingResourceException that * should be handled in the calling code. * * @param basename * The basename of the resource bundle to add. */ public static void add(String basename) { bundles.addFirst(PropertyResourceBundle.getBundle(basename)); }
/** * Adds a resource bundle. This may throw a MissingResourceException that * should be handled in the calling code. * * @param basename * The basename of the resource bundle to add. */ public static void add(String basename, Locale locale) { bundles.addFirst(PropertyResourceBundle.getBundle(basename, locale)); }
/** * Adds a resource bundle. This may throw a MissingResourceException that * should be handled in the calling code. * * @param basename * The basename of the resource bundle to add. */ public static void add(String basename) { bundles.addFirst(PropertyResourceBundle.getBundle(basename)); }
/** * Adds a resource bundle. This may throw a MissingResourceException that * should be handled in the calling code. * * @param basename * The basename of the resource bundle to add. */ public static void add(String basename, Locale locale) { bundles.addFirst(PropertyResourceBundle.getBundle(basename, locale)); }
/** * This method validates that the event processor has the required * configuration. * * @throws Exception */ protected void validate() throws Exception { // Validate that the minimum number of fields are available if (_to == null || _to.size() == 0 || _from == null || _from.trim().length() == 0 || _subjectScriptExpression == null) { throw new RuntimeException(java.util.PropertyResourceBundle.getBundle( "ep-mail.Messages").getString("EP-MAIL-1")); } }
private static ResourceBundle load(final String bundleName, Class<?> hostClass) { try { ResourceBundle lret = PropertyResourceBundle.getBundle(buildFullQualifiedBundleName(bundleName, hostClass), Locale.getDefault(), hostClass.getClassLoader()); return lret; } catch (MissingResourceException e) { //don't die if this resource bundle is not found return null; } }
@Override @NonnullByDefault public ResourceBundle load(Locale key) throws Exception { return PropertyResourceBundle.getBundle("assets/craftbook/strings/strings", key); } }
/** * Loads the resource bundle. * @param c */ private ResourceBundle loadBundle() { String pkg = clazz.getPackage().getName(); Locale locale = getLocale(); return PropertyResourceBundle.getBundle(pkg + ".messages", locale, clazz.getClassLoader(), new ResourceBundle.Control() { //$NON-NLS-1$ @Override public List<String> getFormats(String baseName) { return FORMATS; } }); }
/** * Loads the resource bundle. * @param c */ private ResourceBundle loadBundle() { String pkg = clazz.getPackage().getName(); Locale locale = getLocale(); return PropertyResourceBundle.getBundle(pkg + ".messages", locale, clazz.getClassLoader(), new ResourceBundle.Control() { @Override public List<String> getFormats(String baseName) { return FORMATS; } }); }
/** * Loads the resource bundle. * @param c */ private ResourceBundle loadBundle() { String pkg = clazz.getPackage().getName(); Locale locale = getLocale(); return PropertyResourceBundle.getBundle(pkg + ".messages", locale, clazz.getClassLoader(), new ResourceBundle.Control() { //$NON-NLS-1$ @Override public List<String> getFormats(String baseName) { return FORMATS; } }); }
public void run() { try { synchronized (_timer) { sendMessage(); reset(); } } catch (Exception e) { LOG.log(Level.SEVERE, java.util.PropertyResourceBundle.getBundle( "activity.Messages").getString("ACTIVITY-3"), e); } } };