[ic] Dynamic currency menu

Mike Heins interchange-users@icdevgroup.org
Sun Sep 8 22:00:04 2002


Quoting George Osvald (mail@okstudio.com.au):
> >I would like to create a menu at the top of the page where I could select a 
> >currency. After choosing the desired currency the prices should change 
> >dynamically across the whole website and last a single session. 
> >Could anyone point me to some documentation or give me a hint or two how to 
> go 
> >about this?
> >  
> >
> [setlocale] tag...  Just create a link for each currency type and at the 
> page, issue setlocale and then using the [bounce] tag, you can return 
> back to the main page or if you did what I did, I store the return page 
> for bounce so that I can return to my existing point without needing to 
> use a form submission...
> 
> Is this going to last the whole session or does it only change the current 
> page ?

If you do persist=1 it lasts.

But by far the best way to link to a new locale is:

	[area process/locale/it_IT/page/real_page_name]

That automagically sets the locale and is the equivalent to 
[area real_page_name]. If you do a form action of [area process/locale/it_IT]
it will switch the locale before processing a form.

It actually might be nice to add a "newlocale=it_IT" parameter to the
[page ...], [area ...] and [process ...] tags which handle that.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry