i dont think this is such a bad approach and should work fine in wicket as
well.

see SmartLinkLabel in extensions for something similar.

-igor


On 1/3/07, Ryan <[EMAIL PROTECTED]> wrote:

One tricky i18n problem to solve is how to internationalize a sentence
that has a link somewhere in it. If anyone has solved this problem or
has a suggestion on how to go about doing it in Wicket I would
appreciate the help!

Example sentence:

Use of this Web site constitutes acceptance of the _User Agreement_.

(where the underlined text is a link that normally would be rendered
with a BookmarkablePageLink)

Note that it is tempting to split the sentence into two keys in a
resource bundle (one for the sentence and another for the link text)
and then concat the two strings together to create the sentence. This
might work for a lot of english sentences but does not work for all
languages (for instance if the language requires the link to be in the
middle of the sentence).

In the past (and not using wicket) I have solved this using two place
holders like so:

sentence1=Use of this Web site constitutes acceptance of the {0}User
Agreement{1}.

Then at runtime I construct the dynamic link and replace 0 with the
"<a href...>" and 1 with "</a>". This solution works but I was hoping
there is a nicer solution with Wicket. Any suggestions?

Thanks,
Ryan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to