Translations:Universal Language Selector/Compact Language Links/61/en

Your IP address is checked on the servers against a database which contains mappings from addresses to approximate locations. The results are stored in a cookie named GeoIP. ULS then reads this information and combines it with a [$url list languages spoken in each country of the world], which is maintained by the CLDR project of the Unicode Consortium. The page Geolocation has some more information about this.