Antonio Petrelli on 03/09/07 08:02, wrote:
2007/9/2, Adam Hardy <[EMAIL PROTECTED]>:
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
Thanks for your reply. Unfortunately due to the requirements described in detail
above, that fmt:message solution doesn't apply here.
Any further advice would be greatly appreciated.
Regards
Adam