>>>>> "Dolf" == Dolf Starreveld <[EMAIL PROTECTED]> writes:

    Dolf> On a struts based JSP is need to output something like:
    Dolf> To do x, click <here>
    Dolf> <here> means that words needs to be a link. Without using resource (and
    Dolf> internationalization), it would look like:

    Dolf> <P>To do x, click <a href="URL">here</a></P>

    Dolf> Without internationalization 100% OK, it would become:
    Dolf> <P>
    Dolf>    <bean:message key="click"/>
    Dolf>    <html:link action="/clickAction">here</html:link>
    Dolf> </P>

    Dolf> click=To do x, click

    Dolf> The problem is that this is not fully localizable. In some languages the word
    Dolf> "here" would have to be in a different position. I do not want to have
    Dolf> different JSPs for each locale.

    Dolf> I know I could make a custom tag to do this, but I am hoping somebody already
    Dolf> has a solution to this problem.

It's messy, but you could define your messages that contain links to have three
pieces, being "before link", "link", and "after link".  You could specify all
three in your JSP page in the same way for every locale.  Some locales would
have all three pieces defined, but some locales might just have the "before
link" and "link", and the "after link" would be empty.

If your locale-specific arrangements are any more complicated than this, then
you should use different JSP pages for each locale.  You might be able to get
away with using a smaller include file for just the locale-specific part, and
have the rest of the page just use resources and simple tricks like as
described above.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to