You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by smallufo <sm...@gmail.com> on 2010/11/03 11:38:04 UTC
How to get other page's localized messages ?
If I have two WebPages :
Page1.java
Page1.properties , which stores default value
Page1_zh.properties , which stores Chinese translations
And Page2.java
How do I get Page1's specific localized message in Page2 ?
I noticed the StringResourceModel , but it seems not what I want.
StringResourceModel's constructor must pass a Component object , but I
cannot new Page1 in Page2
Is there anything like :
SomeModel("key" , Page1.class) , so that I can get "key" bound to Page1 ?
Thanks.
Re: SV: How to get other page's localized messages ?
Posted by Igor Vaynberg <ig...@gmail.com>.
Later versions of wicket also support package level bundles stored in
package.properties files
-igor
On Nov 3, 2010 3:43 AM, "Wilhelmsen Tor Iver" <To...@arrive.no> wrote:
> How do I get Page1's specific localized message in Page2 ?
1) Make a superclass for the two pages and put the message in the
superclass' property file
2) Put the property in the Application's property file
In both cases the mechanisms in Wicket will find the message.
- Tor I.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
SV: How to get other page's localized messages ?
Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> How do I get Page1's specific localized message in Page2 ?
1) Make a superclass for the two pages and put the message in the superclass' property file
2) Put the property in the Application's property file
In both cases the mechanisms in Wicket will find the message.
- Tor I.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org