Template talk:R:Collins English Dictionary

Template:R:Collins English Dictionary
Hello.

Your changes to seem to have slightly broken that template: for words with spaces in them, such as,  used to be a valid syntax (i.e. it could fetch the page title and look for that).

Now we have to write with hyphens instead of spaces for it to work. Otherwise it tries to look at "nowherenear" (which doesn't work, obviously: ).

Could you check what's going on? Thanks! --Per utramque cavernam (talk) 16:38, 4 January 2018 (UTC)
 * Btw, this is not your doing, but, and  have the same problem (compulsory hyphens).  doesn't even look for the word when there's a space in it. Any help on how to fix that would be appreciated! (I've detailed the problem at ). --Per utramque cavernam (talk) 17:11, 4 January 2018 (UTC)
 * The old version of didn't work properly either when it came to multiple-word entries. As indicated in the documentation, please use the url parameter to explicitly state the URL if the template does not automatically link properly to the correct webpage. An alternative would be to see if  is able to develop a Lua module to replace all spaces with hyphens which can then be integrated into templates like  and the others that you mentioned. — SGconlaw (talk) 17:49, 4 January 2018 (UTC)
 * There are already modules for that: Module:string and Module:ugly hacks. So you can do or . 20:30, 4 January 2018 (UTC)
 * Thanks, the ugly hacks module seems to have done the trick! (cleaner?) first, but it didn't work. --Per utramque cavernam (talk) 23:29, 4 January 2018 (UTC)
 * Hmm, yes, Module:string adds a hyphen near every character. Ohh, I think that's because Module:string uses Module:parameters, which strips whitespace (lua) from the parameters, converting a space to an empty string, and an empty string matches every position in the string. Heh. — Eru·tuon 23:44, 4 January 2018 (UTC)
 * There should be an additional  tag that causes it to not strip whitespace. But we only have limited control over this; the wiki software itself strips whitespace for you if you specify the parameter with a name. Only unnamed parameters keep their whitespace. That's why the stripping behaviour was added to Module:parameters, to avoid unwanted surprises. —Rua (mew) 23:57, 4 January 2018 (UTC)
 * Sorry for bothering you again, but where/how should I add this  tag? In Module:string or in the templates? --Per utramque cavernam (talk) 14:51, 5 January 2018 (UTC)
 * I think is proposing a new feature in Module:parameters. But maybe it would be easier to instead create a custom parameter-handling function for Module:string that doesn't strip whitespace. — Eru·tuon 20:38, 5 January 2018 (UTC)
 * Why would that be easier? It's literally just an if-statement to add . I've done so now. —Rua (mew) 22:36, 5 January 2018 (UTC)
 * Never mind, you're right. I dunno how much it'll be used though. — Eru·tuon 22:52, 5 January 2018 (UTC)
 * Apparently it was easy and I still managed to mess it up. Thanks! —Rua (mew) 00:19, 6 January 2018 (UTC)
 * I've made the the same type of mistake a lot of times, getting something the opposite way around... — Eru·tuon 07:58, 7 January 2018 (UTC)

Original version
I restored a version near the original one. It works just fine and looks fine:
 * “word” in Collins English Dictionary

Let us recall that this is a further reading and a link to an online resource, and that a user does not need to run into a library and pick the right edition of the right work; the linking online takes care that our user lands on the right page in the reference work intended.

I tested the template in just so in preview mode and it links just fine; it produces just+so in the URL, but that seems to be automatically redirected by the web site to just-so, which you can try yourself: https://www.collinsdictionary.com/dictionary/english/just+so. --Dan Polansky (talk) 06:27, 2 June 2019 (UTC)


 * It doesn't work well with entries that have characters that are not letters of the alphabet, for example:
 * The additional parameters do not need to be used if an editor does not wish to. — SGconlaw (talk) 13:08, 2 June 2019 (UTC)
 * The additional parameters do not need to be used if an editor does not wish to. — SGconlaw (talk) 13:08, 2 June 2019 (UTC)

Source parameter
Can "Collins English Dictionary. Copyright © HarperCollins Publishers" and "Most material © 2005, 1997, 1991 by Penguin Random House LLC. Modified entries © 2019 by Penguin Random House LLC and HarperCollins Publishers Ltd" be assigned values for the  parameter? They can be seen, for example, at the entry for guinea pig. Can the template also be modified so that multiple sources can provided when referencing multiple parts of the webpage? Thanks and take care. &mdash;The Editor's Apprentice (talk) 17:08, 2 November 2021 (UTC)
 * I can add some additional imprint information and sources, but I'm not sure it is a good idea to allow the specification of multiple sources as it would make the reference overly long. It would be better for editors to pinpoint the exact source they are relying on for a specific purpose, and put the reference template within &lt;ref&gt; tags. If the reference template is just being used in a "Further reading" section, in most cases it shouldn't be necessary to specify any source. — SGconlaw (talk) 10:52, 3 November 2021 (UTC)
 * Cool. The reason I am hoping to have the template accept multiple sources can be related back to the guinea pig entry. The section referencing the Collins English Dictionary gives an etymology related to the idea of an unknown land and the Webster’s New World College Dictionary section gives an etymology related to travel between England and the West Africa (Guinea). If I want to reference both of these theories in an etymology section, I would personally think it would be most efficient to use only one reference. I can see an argument for having separate references that are specific to the two circumstances and if that's your position I'll let it stand. Take care.&mdash;The Editor's Apprentice (talk) 23:17, 3 November 2021 (UTC)
 * my suggestion in that entry would actually be to use the template twice, once with each source. I’m not sure needing to refer to different sources in the same website happens often enough to make that a feature in the template. (And, as mentioned above, it would make the reference really long.) — SGconlaw (talk) 05:52, 4 November 2021 (UTC)