You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "spencer.c" <sp...@gmail.com> on 2007/10/25 20:28:25 UTC
Internationalizing Paragraphs w/ Links
If we have a link that is in the body of a paragraph, what is the best way to
internationalize the entire paragraph? As far as I can tell, we would have
to define 3 key/value pairs, ie. before.link.text, link.text,
after.link.text and define the values for each in the properties file(s).
Is that the simplest approach? It doesn't seem to scale if you have a
paragraph with 3 or 4 links in it, so I just wanted to see if there was an
easier way to go about it.
--
View this message in context: http://www.nabble.com/Internationalizing-Paragraphs-w--Links-tf4692728.html#a13413084
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Internationalizing Paragraphs w/ Links
Posted by Igor Vaynberg <ig...@gmail.com>.
you have to do what a wiki does, define the whole paragraph as a
property file and have some special ways to invoke links, for example
something like this:
add(new InternationalizedLabel("label", new ResourceModel("para") {
onclick(int index) {
if (index==1)....
}
with para defined as
para=What [ever] is inside square [brackets] becomes a link
[accessible by its index]
the insides are left as an exercise to the reader :)
-igor
On 10/25/07, spencer.c <sp...@gmail.com> wrote:
>
> If we have a link that is in the body of a paragraph, what is the best way to
> internationalize the entire paragraph? As far as I can tell, we would have
> to define 3 key/value pairs, ie. before.link.text, link.text,
> after.link.text and define the values for each in the properties file(s).
>
> Is that the simplest approach? It doesn't seem to scale if you have a
> paragraph with 3 or 4 links in it, so I just wanted to see if there was an
> easier way to go about it.
>
>
> --
> View this message in context: http://www.nabble.com/Internationalizing-Paragraphs-w--Links-tf4692728.html#a13413084
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org