Wiktionary talk:Random page

Overview
There are various methods of getting a random page in Wiktionary:
 * Using the Mediawiki native function for getting a random page. However, the set of entries from which one is chosen ranges over all the languages. The native function: Special:Random.
 * Using a dedicated function at the toolserver, per language. See the links per language in this project page; for instance: . Accessible using.
 * Using the native function constrained to a namespace, like in Special:Random/Wikisaurus.
 * Using the bookmarklet posted in one of the sections below to pick a random page from a category.

"Excepting recent changes, the text on that site appears below."
Do we really need a copy of the text here?—msh210 ℠  19:45, 17 December 2008 (UTC)
 * Note that the text here has been unchanged since, at least, June of 2007, but is not the same as the one on the Web site. If no one objects pretty soon, I'll remove the text from here.—msh210 ℠  19:49, 17 December 2008 (UTC)
 * Done.—msh210 ℠  07:43, 26 December 2008 (UTC)

Links to random functions don't work. FWIW I am looking for a function that will return xml with the random word and a definition.

Bookmarklet to pick a random element of a category
The following bookmarklet will load a random entry from a category. If used on a category page, it uses that category; otherwise it uses the first category that the current page is in.


 * '' javascript:void((function {function rltr(n) { if (n>0) {return 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'[Math.floor(Math.random*52)]+rltr(n-1);} else {return ""}; }; function prc { if (req.readyState==4 && req.status==200) { var q=req.responseXML.documentElement.getElementsByTagName("cm"); document.location="/wiki/"+q[0].getAttribute("title"); } }; req=new XMLHttpRequest; req.onreadystatechange=prc; req.open("GET", document.location.protocol + "//"+document.location.host + "/w/api.php?action=query&list=categorymembers&cmtitle=" + ((document.location.pathname.indexOf("Category") !=-1 ? document.location : document.getElementById("catlinks").firstChild.childNodes[2].firstChild).pathname.replace("/wiki/","")) + "&cmstartsortkey=" + rltr(3) + "&cmlimit=1&format=xml",true); req.send(null)}))

''

Enjoy! (and please copy it to the various places it should be listed...) JesseW 22:16, 22 May 2009 (UTC)

Inserting direct links from HT's page
Would anyone have a problem with inserting the links from Hippietrail's page http://toolserver.org/~hippietrail/randompage.fcgi?langs direction onto the project page? Or is it too experimental? It looks like that page is generated after every dump (is it created dynamically on each page load?). In case there's weird things in the current version, we could just hard-code random page links for the known languages. We could put the top40 at the top, and alphabetize the rest. --Bequw → ¢ • τ 03:48, 7 July 2009 (UTC)


 * You can add all the random-per-language links you want.
 * Or you could just go to WT:PREFS and switch on "For each language section add interwiki and random links." &mdash; hippietrail 00:29, 27 July 2009 (UTC)


 * I am also intrested in giving a direct link to a single language that is marathi.Presently it does not seem to work. this would be usefull fuction to lot of people with Marathi Language background.
 * I suppose all other people who want to study various languages will also benefit.
 * A wikipedian has given a Java script code, I would be interested to know exactly how to use where to use and as second openion to confirm if that code is safe enough security point of view.
 * Mahitgar 05:26, 24 July 2009 (UTC)

Doesn't Work
No matter how much I try to use any of the links on here, it belches out a 500 error. I have tried it dozens of times, and it's only ever worked twice. The first time, I was shocked because it had been months since I first encountered the problem and it had, minutes earlier, failed. Each time, it gave me this information: Request host: toolserver.org Request path: GET	 /~hippietrail/randompage.fcgi 129.171.233.77 01:22, 24 October 2010 (UTC) Scratch that, it randomly works now, just not for the language I want (mandarin) :/


 * Not sure that we can do anything about this. Is there a contact point for toolserver.org? Equinox ◑ 01:25, 24 October 2010 (UTC)


 * I've fixed this at last. In the future file a bug report on Jira or Bugzilla so that us Wiktionary dev types can track issues. &mdash; hippietrail 15:29, 18 February 2011 (UTC)

doesnt work
79.183.15.191 15:25, 23 March 2013 (UTC)

WFM
This has always and currently works for me, so I'm going to remove the notice that it doesn't work. If it doesn't work, it's a client-side issue. TortoiseWrath (talk) 02:16, 22 May 2013 (UTC)
 * I'd suggest checking, again. I'm with the others (see below).  --Jackson Peebles (talk) 04:59, 14 July 2013 (UTC)

"403: User account expired"
The random page by languagae does not work anymore... :( Jagwar (talk) 20:30, 5 June 2013 (UTC)
 * Same here.95.91.250.139 19:45, 16 June 2013 (UTC)
 * Same. --Jackson Peebles (talk) 05:01, 14 July 2013 (UTC)
 * Wiktionary is aware. Don't hold your breath for it to be fixed, though. I don't know how to fix it, and the people who might know how to fix it are for the most part very busy and/or incommunicado in countries with little internet access. :/ - -sche (discuss) 06:10, 14 July 2013 (UTC)
 * MediaWiki:Sidebar. Just remove the link. DTLHS (talk) 06:12, 14 July 2013 (UTC)
 * Yeah, but that only stops people from clicking on it and being disappointed that it doesn't work...I'd rather make it work again.
 * PS, all of this goes to show that we need to re-sysop you so that you can fix these things yourself. :b - -sche (discuss) 06:16, 14 July 2013 (UTC)

Criteria for inclusion on list of languages?
What are the criteria for including languages in the list? Is there for example a threshold of a certain number of entries in a language for it to be added? TIA.--A12n (talk) 11:26, 27 May 2015 (UTC)

Archived feedback: July 2015
Hi. When using the RandomInCategory operation for some languages, especially Georgian, the system chooses a random word out of maybe 20-30 words in total instead of 13,000. It's doesn't choose a "random word" at all. --176.74.103.118 14:38, 10 July 2015 (UTC)
 * I guess it is because of T27931. Nothing we can do. — Keφr 14:54, 10 July 2015 (UTC)
 * It's a shame. Seemed like a very useful feature. --176.74.103.118 15:15, 10 July 2015 (UTC)
 * It was previously implemented as a Toolserver service, but the Toolserver was shut down (and the service was never properly maintained anyway), so I switched it to use Special:RandomInCategory. You can prod the developers to make a better randomiser, but I would not count on much. — Keφr 15:20, 10 July 2015 (UTC)

Definitions in other languages?
Links such as https://en.wiktionary.org/wiki/Special:RandomInCategory/Japanese_lemmas#Japanese will take you to a random Japanese word definition, in English. However, https://ja.wiktionary.org/wiki/Special:RandomInCategory/Japanese_lemmas#Japanese will not take you to a random Japanese word defined in Japanese.

How do we get definitions in other languages?
 * Naturally, "Japanese lemmas" is not a category on Japanese Wiktionary, and the equivalent is called something else there. &mdash; surjection &lang;?&rang; 15:04, 10 May 2019 (UTC)

Request for edit: Tagalog
I'd like to request for the Tagalog language to be added to the list. Thank you.

Ganmatthew (talk) 15:43, 6 June 2022 (UTC)


 * @Ganmatthew: ✅. —Svārtava (t/u) • 15:46, 6 June 2022 (UTC)