Re: Problem with TemplateLoader changing the template's name

"Nick Sanderson" <[email protected]> Wed, 05 Oct 2005 09:37:21 +0100
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
Hi 

We do much the same thing but we use a simple  interceptor context
tool.
We use an internationaliastion service to populate the context with a
language key 
and then always use a call to the tool to find internationalised
templates.

eg

#include as template "$Paths.template("myResource.wmt",$DEFAULT_PATH))

where $DEFAULT_PATH is usuallly "en"

The tool caches the existing found paths for speed. 

So if the site is in French you would get "fr/myResource.wmt" and so on
or if that didn't exist it would default to "en/myResource.wmt"

We use versions of  the same tool for javascript,images,stylesheets
etc.

Regards

Nick



>>> [email protected] 10/04/05 09:23pm >>>
Sorry Sven.  I'm afraid I don't quite understand what you are trying to

do and what isn't working.  I'm pretty sure that the caching mechanism

is based on the template name, including the path, so you'll need to 
determine the path before you attempt to retrieve the template.

If you give some more detail and maybe some code, we can try to be of 
more help.  It does sound like a very worthwhile project.

Keats


Sven Schliesing wrote:

> No answer? Is the webmacro-community dead? Or just this list?
>
> Sven Schliesing wrote:
>
>> Hi,
>>
>> I just finished my custom template loader for webmacro. Goal of it
is 
>> context-based template loading and internationalization . It takes a

>> template name ("index" for example), determines the directory where

>> the appropriate version resides and adds an internationalization
suffix.
>
> ...
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads,
discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl 
> _______________________________________________
> Webmacro-user mailing list
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/webmacro-user 
>




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,
discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl 
_______________________________________________
Webmacro-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/webmacro-user 


This mail has been checked at MSXI for all known virus'.
You open this at your own risk. Please make sure all replies are virus free.
Also, we do not accept or send attachments of the type exe, vbs, scr or bat due to the increased virus risk they contain.
These types of attachments will be stripped from the message.

MSXI



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl