[ale] Can I identify the country of origin?
Denny Chambers
dchambers at snapserver.com
Wed Sep 25 11:16:38 EDT 2002
I am working on an app right now that does this. We are using java
servlets which makes this real easy. There are three methods
ServletRequest.getLocale(), ServletRequest.getLocales() and
ServletResponse.setLocale(). Which every programming language you use,
what you want to look for is the HTTP header "Accept-Language". This can
actually be more than one language. There are ordered by the users
preference. While this will not guarantee what contry to user is from,
it will give you an idea what language he/she would like to see.
HTH,
Denny
Jim Lynch wrote:
>I know it is an off topic question, but this group represents some of
>the best minds in town. My boss asked me if I could identify the
>country of origin of systems connecting to our web page. I think he
>wants to automate the language displayed. I told him I wasn't aware of
>anything, but decided I'd ask a larger audience before I gave him an
>absolute no. I know I can do a name lookup and sometimes figure out the
>country, but that won't always work.
>
>Ideas?
>
>Thanks,
>Jim.
>
>---
>This message has been sent through the ALE general discussion list.
>See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
>sent to listmaster at ale dot org.
>
>
>
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list