Don Brown wrote:
> 
> On 8/4/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>> With Struts 2, how would I go about doing the following:
>>
>> 1. Replace the i18n resolution logic to load key/value pairs from a
>> database
>> instead of properties files?
> 
> Well, if your Action class implements TextProvider (as does
> ActionSupport), then you can resolve keys any way you'd like.  As for
> plugging/altering the existing lookup that is used by ActionSupport,
> it really isn't possible right now, and I've love to see a patch
> making that more flexible... *hint* *hint* :)
> 

Does this affect <s:text> as well? I'm not as concerned about Java reading
i18n files as I am about JSPs.


Don Brown wrote:
> 
> 
>> 2. Add an extra processing step to translate wiki syntax in values to
>> HTML?
> 
> You mean like creating your own template to customize the rendering of
> the control?  If using Freemarker, there might be a nice way to write
> something like the ?html piece that processes returned values.
> 

No, I'm looking to add an extra process step. Here's an example, using JSTL
<fmt:message> since I'm more familiar with it:

messages.properties:
page.message=Welcome to My Cool App *{0}*!

page.jsp:
<fmt:message key="page.message"><fmt:param
value="${user.firstName}"/></fmt:message>

renders:
Welcome to My Cool App *Matt*!

I want it to render:

Welcome to My Cool App <strong>Matt</strong>!

Thanks,

Matt



-- 
View this message in context: 
http://www.nabble.com/-s2--Is-it-possible-to-replace-supplement-i18n-resolution-logic--tf4214304.html#a12023712
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to