Wiktionary talk:Random page

Latest comment: 1 year ago by Svartava in topic Request for edit: Tagalog

Overview edit

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: English. Accessible using {{random language|English}}.
  • 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." edit

Do we really need a copy of the text here?—msh210 19:45, 17 December 2008 (UTC)Reply

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)Reply
Done.—msh210 07:43, 26 December 2008 (UTC)Reply

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 edit

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)Reply

Inserting direct links from HT's page edit

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)Reply

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)Reply

Doesn't Work edit

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) :/Reply

Not sure that we can do anything about this. Is there a contact point for toolserver.org? Equinox 01:25, 24 October 2010 (UTC)Reply
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. — hippietrail 15:29, 18 February 2011 (UTC)Reply

doesnt work edit

79.183.15.191 15:25, 23 March 2013 (UTC)Reply

WFM edit

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)Reply

I'd suggest checking, again. I'm with the others (see below). --Jackson Peebles (talk) 04:59, 14 July 2013 (UTC)Reply

"403: User account expired" edit

The random page by languagae does not work anymore... :( Jagwar (talk) 20:30, 5 June 2013 (UTC)Reply

Same here.95.91.250.139 19:45, 16 June 2013 (UTC)Reply
Same. --Jackson Peebles (talk) 05:01, 14 July 2013 (UTC)Reply
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)Reply
MediaWiki:Sidebar. Just remove the link. DTLHS (talk) 06:12, 14 July 2013 (UTC)Reply
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)Reply

Criteria for inclusion on list of languages? edit

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)Reply

Archived feedback: July 2015 edit

Definitions in other languages? edit

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? — This unsigned comment was added by Garfieldnate (talkcontribs).

Naturally, "Japanese lemmas" is not a category on Japanese Wiktionary, and the equivalent is called something else there. — surjection?15:04, 10 May 2019 (UTC)Reply

Request for edit: Tagalog edit

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

{{random language|Tagalog}}

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

@Ganmatthew:   Done. —Svārtava (t/u) • 15:46, 6 June 2022 (UTC)Reply
Return to the project page "Random page".