Search in sources :

Example 1 with ResourceBundleLoader

use of com.serotonin.web.i18n.ResourceBundleLoader in project ma-core-public by infiniteautomation.

the class LocalizationFilter method doFilter.

public Object doFilter(Object obj, Method method, Object[] params, AjaxFilterChain chain) throws Exception {
    WebContext webContext = WebContextFactory.get();
    if (resourceBundleDirectory != null && resourceBundleLoader == null)
        resourceBundleLoader = new ResourceBundleLoader(webContext.getServletContext().getRealPath(resourceBundleDirectory));
    I18NUtils.prepareRequest(webContext.getHttpServletRequest(), localeResolverName, bundleBaseName, resourceBundleLoader);
    return chain.doFilter(obj, method, params);
}
Also used : WebContext(org.directwebremoting.WebContext) ResourceBundleLoader(com.serotonin.web.i18n.ResourceBundleLoader)

Aggregations

ResourceBundleLoader (com.serotonin.web.i18n.ResourceBundleLoader)1 WebContext (org.directwebremoting.WebContext)1