You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gerald Schöffel <ta...@online.de> on 2006/01/21 06:06:39 UTC
lost in i18n ...
Hi, it is me again :)
At this time I am trying to implement internationalization.
And because of the cool Tapestry features I am advancing really fast.
But now I run into a simple, but annoying problem ... or maybe I am just to tired :)
The HTML output should be like:
Please click <a href="/page,aDirectLink">here</a> to register.
Is there a Solution without breaking the sentence into 3 parts ?
Like in
page.html
<span key="part1"/><a jwcid="registerLink"><span key="part2"/></a><span key="part3"/>
page.properties
part1=Please click
part2=here
part3=to register.
I was fumbling with messages.format() and messages.getMessage() using message-parameters - but the Tapestry stuff is not interpreted (ok, it was worth trying :) ).
Any suggestions ?
Thanks,
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: lost in i18n ...
Posted by Kent Tong <ke...@cpttm.org.mo>.
Gerald Schöffel <tapestry.gs <at> online.de> writes:
> The HTML output should be like:
>
> Please click <a href="/page,aDirectLink">here</a> to register.
>
> Is there a Solution without breaking the sentence into 3 parts ?
The only solution that I can think of is to use a separate html
for each language. Then you don't need the .properties files
and the whole sentence will be in the html file.
If you'd like, you can still use the .properties files even if
you use multiple html files.
--
Author of a book for learning Tapestry (www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: lost in i18n ...
Posted by Ryan <cr...@gmail.com>.
We recently needed to solve this problem as our translation team would
not accept spliting the sentence into three keys. We ended up using
placeholders in our properties file to insert the html into the
sentence, ie:
This is a sentence that has a link in it right {0}here{1}.
Where {0} is replaced with <a href="..."> and {1} with </a>. This has
the nasty side effect of not being able to 1) specify the sentence in
the html template, 2) not being able to create a link within a
sentence that is composed of a tapestry component and 3) just plain
annoying. It would be nice if tapestry had some mechanism to make this
easier to deal with (fully understanding other frameworks have similar
issues).
ryan
On 1/20/06, Gerald Schöffel <ta...@online.de> wrote:
> Hi, it is me again :)
>
> At this time I am trying to implement internationalization.
>
> And because of the cool Tapestry features I am advancing really fast.
>
> But now I run into a simple, but annoying problem ... or maybe I am just to tired :)
>
> The HTML output should be like:
>
> Please click <a href="/page,aDirectLink">here</a> to register.
>
> Is there a Solution without breaking the sentence into 3 parts ?
>
> Like in
>
> page.html
> <span key="part1"/><a jwcid="registerLink"><span key="part2"/></a><span key="part3"/>
>
> page.properties
> part1=Please click
> part2=here
> part3=to register.
>
> I was fumbling with messages.format() and messages.getMessage() using message-parameters - but the Tapestry stuff is not interpreted (ok, it was worth trying :) ).
>
> Any suggestions ?
>
> Thanks,
> Gerald
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org