Dashboard > RIFE > ... > Templates > Reloading localization resource bundles
RIFE Log In   View a printable version of the current page.
Reloading localization resource bundles


Added by Geert Bevin, last edited by Geert Bevin on Sep 28, 2004
Labels: 
(None)



The standard JDK java.util.ResourceBundle class caches all bundles after their first load. While this is good for performance, it makes the development of localized web applications cumbersome since a developer has to restart the application after each change to a properties file. RIFE's com.uwyn.rife.tools.Localization class provides helper methods to easily obtain resource bundles and now also includes a ResourceBundle implementation that will automatically reload when the content changed. Each time a resource bundle is obtained, the modification time is checked and when it's newer than a previous version, it's loaded again. This ensures that all modifications are immediately reflected. Since all features that use resource bundles in RIFE depend on this class, this feature is now also active throughout the whole of the framework. You can set the L10N_RESOURCEBUNDLE_AUTO_RELOAD configuration parameter to turn the automatic reloading off, in that case the standard JDK class will be used. By default, reloading resource bundles will be used.



Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.1a Build:#515 May 19, 2006) - Bug/feature request - Contact Administrators