Forum Discussion
Farsheed_Solima
Nimbostratus
Aug 29, 2013Changing interface language explicitly regardless of HTTP header
Hello Everyone,
I would like to change a page's language explicitly - regardless of what is sent in the HTTP header. A practical example is that I need to show English by default and have a link...
Kevin_Stewart
Employee
Aug 29, 2013David's right on the money with HTTP::header replace:
HTTP::header replace "Accept-Language" "en"
This can be used in a request or response, but in this case you'd be replacing a request header. As for performing URI-switching logic based on the requested language:
when HTTP_REQUEST {
switch [HTTP::header "Accept-Language" {
"en" {
HTTP::uri "/en/something/"
}
"fr" {
HTTP::uri "/fr/something"
}
...
}
}
You mentioned a "webtop", so if this is being used with APM, replace HTTP_REQUEST with ACCESS_ACL_ALLOWED.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects