public static String getLocalizedString(String key, String pluginName, List<?> arguments, Locale locale, boolean fallback) {
        if (pluginName == null) {
            return getLocalizedString(key, arguments);
        }

        if (locale == null) {
            locale = JiveGlobals.getLocale();
        }
        String i18nFile = getI18nFile(pluginName);

        // Retrieve classloader from pluginName.
        final XMPPServer xmppServer = XMPPServer.getInstance();
        PluginManager pluginManager = xmppServer.getPluginManager();
        Plugin plugin = pluginManager.getPluginByCanonicalName(pluginName)
            .orElseThrow(() -> new NullPointerException("Plugin could not be located: " + pluginName) );

        ClassLoader pluginClassLoader = pluginManager.getPluginClassloader(plugin);
        try {
            ResourceBundle bundle = ResourceBundle.getBundle(i18nFile, locale, pluginClassLoader);
            return getLocalizedString(key, locale, arguments, bundle);
        }
        catch (MissingResourceException mre) {
            Locale jivesLocale = JiveGlobals.getLocale();
            if (fallback && !jivesLocale.equals(locale)) {
                Log.info("Could not find the requested locale. Falling back to default locale.", mre);
                return getLocalizedString(key, pluginName, arguments, jivesLocale, true);
            }
            
            Log.error(mre.getMessage(), mre);
            return key;
        }
    }
Returns an internationalized string loaded from a resource bundle from
the passed in plugin, using the passed in Locale.

If the plugin name is {@code null}, the key will be looked up using the
standard resource bundle.

If the locale is {@code null}, the Jive Global locale will be used.

@param key
           the key to use for retrieving the string from the appropriate
           resource bundle.
@param pluginName
           the name of the plugin to load the require resource bundle
           from.
@param arguments
           a list of objects to use which are formatted, then inserted
           into the pattern at the appropriate places.
@param locale
           the locale to use for retrieving the appropriate
           locale-specific string.
@param fallback
           if {@code true}, the global locale used by Openfire will be
           used if the requested locale is not available
@return the localized string.
xmppserver/src/main/java/org/jivesoftware/util/LocaleUtils.java