Hi David,
In velocity templates, you could simply use the velocity tool, ResourceTool. [1]
You could add the tool definition in /jetspeed/WEB-INF/toolbox.xml like the
following:
<tool>
<key>text</key>
<class>org.apache.velocity.tools.generic.ResourceTool</class>
<!-- default resource bundle as an example -->
<parameter name="bundles"
value="org.apache.jetspeed.decoration.resources.DecoratorActions"/>
<!-- default locale -->
<parameter name="locale" value="en_US"/>
</tool>
The two parameters in the above are just optional and default resource
bundle/locale settings.
And, you could refer the tool by the name 'text' and append the resource keys:
<p>$text.view</p> <!-- equivalent to bundle.getString("view") -->
Please refer to [2] for details on how to use. You can also load other resource
bundles.
[1] http://velocity.apache.org/tools/releases/1.3/generic/
[2]
http://velocity.apache.org/tools/releases/1.3/javadoc/org/apache/velocity/tools/generic/ResourceTool.html
Kind regards,
Woonsan
----- Original Message ----
> From: David Just <[email protected]>
> To: Jetspeed Users List <[email protected]>
> Sent: Tue, April 13, 2010 10:26:51 PM
> Subject: Adding translatable text to decorator
>
> I need to be able to translate the text that I put into my decorator
(which
> is currently hardcoded into the header.vm/footer.vm files). Is
there a
> properties file that I can modify or where should I
add/configure a new
> properties file for my translatable text? How can I
access it from the
> header.vm/footer.vm files.
>
Thanks.
Dave
David Just l Senior Software Engineer
> l Vision Solutions l +1 (507) 529-5939 l
> ymailto="mailto:[email protected]"
> href="mailto:[email protected]">[email protected]
The
> contents of this e-mail (and any attachments) are privileged and
> confidential.
> Unauthorized use is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]