Magnus Manske <magnusmanske@...> writes:
Basically, this will (on the search page only!) look
at the last query
run (the one currently in the edit box), check several language
editions of Wikipedia for articles from the individual words (in this
case, "Pferd" and "Schach"), count how many exist, pick the language
with the most hits (in this case, German), and put a link to link to
Nikola's tool under the search box. The link pre-fills the source
language and query in the tool, which automatically opens the
appropriate search page.
Again, I would suggest using Google (or an alternative with open data, if one
exists) instead of trying to reinvent the wheel:
http://translate.google.com/#auto|en|Pferd%20Schach
http://code.google.com/apis/ajaxlanguage/documentation/#Detect
It might support less languages then we have wikipedias for, but I'm pretty sure
it would give better results for the major ones.