Forum Discussion
The_Bhattman
Mar 31, 2011Nimbostratus
Hi Puli,
You can pull this from the HTTP header fields.
Specifically HTTP header field called Accept-language header
Click Here to go to a link that discusses accept-language header
As for the code I suppose you can use a untested iRule scripts like the following
when HTTP_REQUEST {
if { [HTTP::header "Accepted-Language"] contains "fr" } {
HTTP::redirect http://www.abc.com/fr/help
}
}
or you can go switch command route if you have many different language pages.
when HTTP_REQUEST {
switch -glob [HTTP::header "Accepted-Language"] {
"*fr*" - { HTTP::redirect http://www.abc.com/fr/help }
"*en-us*" - { HTTP::redirect http://www.abc.com/fr/help }
default - { HTTP::redirect http://www.abc.com/help }
}
}
The tool that I normally use is the HTTPFox to quickly look at the language my browser is set to. Click Here to see view how you can switch languages on the browser level.
I hope this helps
Bhattman