Last modified: 2013-03-16 14:59:53 UTC
Here is the recipe to guess the language configured by a user using the API: * Select a user wiki page where there is some links to some other user page, i.e. containing links like [[User:<sameuser>/<otherpage>]] * Get last revision of this page using the API * Links returned from the page content contains links whose namespace is localized to the language configured by the user (ex: [[Utilisateur:...]] for French) This bug also disallow API usage to process links contained in a page. Examples: * https://en.wikibooks.org/w/api.php?action=query&titles=User%3ADavidL%2FSignature&prop=revisions&rvlimit=1&rvdir=newer&rvprop=timestamp%7Cuser%7Ccomment%7Ccontent&format=json --> DavidL account language set to French because links use "Utilisateur" namespace * https://en.wikibooks.org/w/api.php?action=query&titles=User%3ABryanBot&prop=revisions&rvlimit=1&rvdir=newer&rvprop=timestamp|user|comment|content&format=json --> BryanBot account language set to English because links use "User" namespace
No, the query for the first revision of User:DavidL/Signature has "Utilisateur" because that's what your bot put into the page: https://en.wikibooks.org/w/index.php?title=User:DavidL/Signature&oldid=2358155&action=edit If anything in MediaWiki did try to change the links in the rendered wikitext as you claim, it would be entirely broken because "Utilisateur:" isn't a namespace prefix on other-language projects.
Sorry for not seeing this. I get confused by rvdir=newer which give the oldest revision. I misunderstood the meaning of the parameter.