[ic] set locale from URL?

Mike Heins mike at perusion.com
Wed Aug 3 16:22:40 UTC 2011

Quoting Peter (peter at pajamian.dhs.org):
> On 04/08/11 02:57, DB wrote:
> > Hi - is there a way to set the locale by modifying the URL of a page?
> > 
> > For example:
> > http://domain.com/page.html?locale=something
> Sure, you can use an AutoLoad to read in the locale from the CGI
> variable and pass the value to the setlocale tag.  Something like:
> AutoLoad <<EOA
> [calcn]
> 	return unless $CGI->{locale};
> 	$Tag->setlocale($CGI->{locale});
> 	return;
> [/calcn]

There is also a builtin locale changing URL:


A bit cumbersome, so you may decide to go with the AutoLoad.
But it is builtin.

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

My wife is great.  She doesn't care where I go, just as long as I don't
have any fun.  -- Lee Trevino

More information about the interchange-users mailing list