tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: internationalised strings in the database
Date Mon, 03 Sep 2007 07:02:47 GMT
2007/9/2, Adam Hardy <ahardy.struts@cyberspaceroad.com>:
> It would be great if someone could give me some insights into possible ways of
> leveraging tiles2 in order to provide translating facilities on a page by page
> basis for a website, where the translated strings are kept in a database,
> indexed by the JSP where they are used and a non-unique name (e.g. title).
>
> (1) is it possible to write a taglib that could work out automatically what the
> name of its JSP is?
>
> (2) given no. 1 is possible, would it be possible to work out the name of the
> master tile that the taglib is in, in order to quote that tile in a URL param
> like this:
>
> app/somepage/translate?thisTile=xyz
>
> so that the 'translate' page could retrieve and display translated strings in a
> form for all JSPs used by the master tile?

The standard way of using internationalized string is (if you are
using plain JSP) JSTL <fmt:message> tag:
http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/fmt/message.html

Antonio

Mime
View raw message