Thanks Byron
Yes I have all UTF-8 encodded templates!
My problem is I am to passing java.util.Locale with me using this I want to
load proper velocity template.
One simple way is as I mentioned earlier:
if (locale == null)
{
locale = Locale.getDefault();
}
String templateFile = "xyz.vm"+ "." + locale.toString().toLowerCase();
// Use templateFile e.g. xyz.vm.en_us or xyz.vm.de
Now I was thinking whether I can use Velocity tools for the same. (Please
note: I am in offline mode: no servlets, struts etc)
Thanks
-----Original Message-----
From: Byron Foster [mailto:[email protected]]
Sent: Saturday, March 14, 2009 6:39 PM
To: Velocity Users List
Subject: Re: Does velocity engine supports I18N ?
Couldn't you always maintain your template files in UTF-8, then always
merge in UTF-8 and send out the email in UTF-8. Unless I'm not
understanding the problem. I'm not sure what a I18N tool would do for
you, unless this is more of an issue of date and number formatting.
On Mar 14, 2009, at 0:35 , Preetam Palwe wrote:
> Precisely I am trying to use Velocity engine as a offline tool to send
> emails.
> I have an option or workaround to keep Locale specific velocity
> templates
> like "body.vm.de" , "body.vm.en_us" etc.
> But I was wondering whether there is an inbuilt support in velocity
> for
> I18N?
>
> Jian, If you could please share the your parser code which enables
> Velocity
> I18N in offline mode to the mailing list, it would be great!
> I had read about "Multiviews" in velocity tools but looks like I
> can't use
> it in offline mode.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]