We're trying to add i18n capabilities to our portal and we're looking for a way to find out the user's browser. Since its a major corporation we cannot add the language via javascript in the first request made to the webfocus server.
So, there were a couple of solutions but I'm not sure about them.
One was to hijack the HttpRequest on the servlet and add a new paramenter to the request using HttpRequestWrapper and creating my own new request with the new parameter, but that seems to me as a very obscure workaround to be made.
Is there any simpler and clean way to get the browser's language so that I can set regional specific text depending on the browser language?
Thanks in advance!
PedroThis message has been edited. Last edited by: pferreira,
WF 8.0.02 @ Linux environment
July 17, 2012, 12:35 PM
Dan Satchell
You might find this post helpful: webserver variables. I believe variable HTTP_USER_AGENT is the one that provides browser info.
WebFOCUS 7.7.05
July 17, 2012, 01:45 PM
pferreira
Thanks Dan! It works.
FYI, it's HTTP_ACCEPT_LANGUAGE that hold the browser's language config.