You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by de...@vitalassets.com on 2004/03/29 15:04:26 UTC
Localization in the .java file for a page?
We have localized all our pages with .properties files for each page. We have some string messages that are built in the java code for a page in the submit listener we defined. I haven't found a way to use the properties file as a ResourceBundle because they aren't technically in the classpath so the java code can't see it. Is there a recommended way to do this so that I can refer to the same localization files in my java code that my page files and templates use?
Thanks,
David
--------------------------------------
David Ethell
Senior Engineer, Vital Assets, Inc.
Phone: 800.860.0607 Ex: 102
Email: dethell@vitalassets.com
3916 Germantown Rd
Edgewater, MD 21037
--------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Localization in the .java file for a page?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 29, 2004, at 8:04 AM, dethell@vitalassets.com wrote:
> We have localized all our pages with .properties files for each page.
> We have some string messages that are built in the java code for a
> page in the submit listener we defined. I haven't found a way to use
> the properties file as a ResourceBundle because they aren't
> technically in the classpath so the java code can't see it. Is there a
> recommended way to do this so that I can refer to the same
> localization files in my java code that my page files and templates
> use?
look at the getMessage method available from the page or component
level. This goes through the same mechanism that page files and
templates use.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org