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

Your IP address is checked on the servers against a database that contains mappings from addresses to approximate locations. The results are stored in a cookie named. ULS then reads this information and combines it with a [$url list of 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.