You can put a ResourceBundle directly into your context:
context.put("labels", ResourceBundle.getBundle("labels"));
and then do
$labels.getString('username')
or you can put a java.util.Properties in and just use $props.get('username')
or you can use VelocityTools' ResourceTool class. For this, you can
either use the VelocityTools infrastructure to put it into the context
or do something like:
context.put("text", new ResourceTool().bundle("labels"));
and then do
$text.username
On Wed, Dec 3, 2008 at 9:28 AM, carlo latasa <[EMAIL PROTECTED]> wrote:
> Hello
>
> I'm trying to get velocity to use a properties file of mine that has
> customized labels. This is so I can call a velocity tag like : #stextfield(
> "label='member.username.label'" "name='username'" "size=25") where the label
> value would be defined in the properties file.
>
> Is it just a matter of putting the properties into some kind of static
> Velocity class somewhere?
>
> Thanks in advance,
>
> Carlo
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]