You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Dickerson, Monty W." <Mo...@viatel.com> on 2000/09/06 23:58:50 UTC
RE: content-negotiation? localized templates? looking for WM.get
Template(String key, Local e locale)
From: Tom@Vaughan.to
>
>Forgive me if this is in the docs somewhere, but it looks like (according
>to the code I looked at) that there is no support for content-negotiation
>within velocity. Correct? I'd like to be able to have:
>
> index.en.vm
> index.es.vm
> index.de.vm
>
>-Tom
good idea. cross reference to mine:
[Webmacro] localized templates? looking for WM.getTemplate(String key, Local
e locale)
http://lists.semiotek.com/archives/webmacro/2000-August/001854.html
quoted here:
>public final Template getTemplate(String key) throws NotFoundException
>- Retrieve a template from the "template" provider. Equivalent to
>getBroker().getValue("template",key)
>
>Howdy, Justin et.al.!
>
>I'm looking for a way to have WebMacro load the correct template based
>on the current invocation's locale (for instance en_US) using the same
>search algorithm that ResourceBundle uses when it looks for a dot
properties
>file (for example: 1st filename_en_US.properties, 2nd
filename_en.properties,
>3rd filename.properties).
>
>If anyone is writing international servlets (i18n) which must be
>localized (l10n);
>* have you thought of this?
>* is it implemented but I just don't know about it yet?
>* does it sound like a good idea?
>* is there a better way or an alternative way of achieving the same
>purpose, which is already implemented?
>
so far I have no answer from any developer
just a hack from a user
monty