web applications - How to get user region/country information in web-applicaiton? -
My main purpose is to show a different page for different country people. I think this user area / country Should be based on, which I think can get out of the IP address?
Example: * For people of N nation, they will see it. Www.example.com
* For the Japanese, they will dispatch on this. Www.example.com/jp
In addition to this I told some people to fulfill these objectives, the best method is based on the web-browser language, which can be obtained from the http header is. I do not know which is better, what is the common way and why ..?
Thank you for your advice!
I'am is using Flex and Java.
To easily find area / country / province from zolo, IP address, you can get some of the maximum GIOP database , But there are some drawbacks:
- VPN and cache may get false value
- Users can not override it easily.
With browser acceptability: Headers are generally preferred because a Spanish speaking person in America can set their language settings to 'N' instead of 'E' Even though their IPs can get them 'n'.
When I had to do this in the past, I ended up with an ordered priority list within the language selection argument, as well as overriding the following people at each level:
- Stored in a flag icon, session or cookie on the user preference site expressed by slicing
- TLD of the domain, nothing indicator with .com (ex: mycompany.jp , But mycomany.com is a "no vote" and
- GOIP best guess
- Fallback in English
Comments
Post a Comment