Hello David,
Thanks to everybody for help.
But I need to get localized string in my Action class inherited from
Velocity Action class, not in Velocity template.
I figured out that I can use CustomLocalization.getString(...) method. Is that right
way?
>>
>>>Hello ,
>>>
>>>My question is:
>>>how to get localized string from buildNormalContext(VelocityPortlet
>>>portlet, Context context, RunData rundata)
>>>method in VelocityPortletAction.
>>
>>
>> I was able to do this via this code, in my buildNormalContext method:
>>
>> Object ltojb = context.get("l10n");
>> CustomLocalizationTool lt = (CustomLocalizationTool) ltojb;
>> context.put("test", lt.get("HELLO"));
>>
>> In the template, you just reference $test as normal.
DST> the localized string "HELLO" can be accessed in your templates as:
DST> ${l10n.HELLO}
DST> this the context.put is unnecessary
--
Best regards,
Peter mailto:[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]