Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Automatic language recognize ?
Old 03-22-2008, 04:46 PM Automatic language recognize ?
Novice Talker

Posts: 4
Trades: 0
For ex.
I`m from Macedonia, and when I open Mozilla[dot]com I`m recognized, and the left green Download Firefox Free banner, it says 2.0.0.12 for Windows, Macedonian (5.7MB). I guess when someone from England opens the site, the banner says English (X.XMB).
I hope someone can give me a explanation on how to do this.
Thank You !


XHTML is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-22-2008, 05:11 PM Re: Automatic language recognize ?
carloncho's Avatar
Skilled Talker

Posts: 80
Name: Carlos
Trades: 0
The most probably is its use some function to recognize the country through your IP. There is a database with pairs "IP From - IP To" - "Country". The function (or class) take the value of the Country from the database with the ip given as parameter.
Is not 100% correct, but work good.
There is several pay services to make this too. In some cases you get country and city.
It is a link to download a php function. You need the funcion and the database. Here is the instructions.
http://chir.ag/tech/download/geoiploc/
In PHPClasses there is several like this too.
This is a pay service that give more data than the country:
http://www.ip2location.com/free.asp

In google "ip to country" or "ip to location" appears several good results. I dont remember, but if you need, i can search in my other machine: i used a script that not use database, it use a text file to retrieve the information.
The problem with all of this scripts is that the information must be updated frequently.
__________________
-----------------------

Please login or register to view this content. Registration is FREE
carloncho is offline
Reply With Quote
View Public Profile Visit carloncho's homepage!
 
Old 03-24-2008, 03:06 AM Re: Automatic language recognize ?
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Either IP or Accept-Language HTTP header
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 03-24-2008, 08:16 AM Re: Automatic language recognize ?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
i was going to say that.

I would *think* in that kind of case the http header might be better because then its the users *chosen* lanaguage if you know what i mean.

Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to Automatic language recognize ?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.65420 seconds with 12 queries