saoj
Joined: 10/01/2008 08:20:15
Messages: 39
Offline
|
First get the velocity-dep-1.4.jar file that comes with Mentawai in the lib directory and place it inside the WEB-INF/lib directory of your web application.
Now use the following code inside your action:
The default directory to look for letters is /letters and for each locale you create a directory, for example:
/letters/pt_BR/hello.html
/letters/en_US/hello.html
The correct file will be loaded depending on the user locale, and the attributes will be replaced by a velocity template. You hello.html file might look like this:
Your HTML file will be treated as a velocity template, so you can use any velocity feature you want inside it.
|