You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Juan Alvarez <ja...@fluidsignal.com> on 2003/03/06 14:33:52 UTC

Centralized localization

I am answer to myself:

this code solution my problem:

public class UtilPage extends BasePage
{
    
public String getLocalizedString(String key)
      {
   	String packageName =
	this.getClass().getPackage().getName();
	ResourceBundle bundle = ResourceBundle.getBundle(packageName + ".Localization", 
		getLocale(),
		Thread.currentThread().getContextClassLoader());
	return bundle.getString(key);
      }
}

I use jboss 3.0.0 and i get the idea of the implementation of
Palette.java.  But i need to change some important think, the getBundle
function without the classloader as a parameter does not work.

I think in my configuration, the Palette example cant work, and may need
the use of tha classloader of the current thread as a parameter

-- 
Juan Alvarez		                    Fluidsignal Group S.A.
mailto:jalvarez@fluidsignal.com        http://www.fluidsignal.com/
Key fingerprint: 15C4 0986 A174 862A B607 8EEA 934F 8649 07E2 EA40