Template talk:Linktext

Can someone modify the Wiktionary links to become wikt:新#Chinese or wikt:新#Japanese rather than just wikt:新 when the language codes lang=zh or lang=ja are specified? There are significant differences between Chinese and Japanese entries on Wiktionary. KevinUp (talk) 15:44, 31 May 2019 (UTC)[reply]

Template-protected edit request on 25 February 2022

Per the almost-three-year-old comment on the Template talk:Linktext page, please update the template to include the indicated language in the target link.

Current template output for {{linktext|命|lang=ja}}:

  • <span lang="ja"><a href="https://en.wiktionary.org/wiki/%E5%91%BD" class="extiw" title="wikt:命">命</a></span>
Functionally almost equivalent to {{lang|ja|[[:wikt:命|命]]}}

Desired template output for {{linktext|命|lang=ja}}:

  • <span title="Japanese-language text"><span lang="ja"><a href="https://en.wiktionary.org/wiki/%E5%91%BD#Japanese" class="extiw" title="wikt:命">命</a></span></span>
Functionally equivalent to {{lang|ja|[[:wikt:命#Japanese|命]]}}

Rationale

{{linktext}} currently only links to the top of a Wiktionary page.

Some pages have entries in multiple languages, sometimes very long entries.

If an editor supplies a language code to the template, the editor presumably expects the link to take the reader not just to that Wiktionary page, but more specifically to the entry on that page for the indicated language code.

Wikicode changes

For every instance of:

[[{{{pref|wikt}}}:{{{1}}}|{{{1}}}]]

Replace with:

[[{{{pref|wikt}}}:{{{1}}}{{if#:{{{lang|}}}|{{!}}lang={{{lang}}}}}|{{{1}}}]]

... and so on and so forth for each of the 20 possible input parameters.

My template coding skills are a bit rusty, so please double-check the bit about the {{!}} in particular. ‑‑ Eiríkr Útlendi │Tala við mig 00:14, 26 February 2022 (UTC)[reply]

 Not done (yet) Please make all your requested changed in the sandbox, test them, then reactivate when ready. — xaosflux Talk 01:01, 26 February 2022 (UTC)[reply]
@Xaosflux, whomever else, please see what appears to be working code at Template:Linktext/sandbox, and some simple tests at Template talk:Linktext/Sandbox.
For future improvements, we could add a test to see if pref is a lang code, and change the target language for #language to match that.
‑‑ Eiríkr Útlendi │Tala við mig 19:46, 1 March 2022 (UTC)[reply]
 Done Also note that I moved the tests to Template:Linktext/testcases, which is the standard place for them. * Pppery * it has begun... 01:15, 20 March 2022 (UTC)[reply]

Parenthesis bug report

Retracting false alarm for a bug (I wrongly used n3 instead of n4 in syntax). I encountered a problem splitting compound words, then adding parentheses.

{{linktext|Death|bringer |n2= (|Death|trial|n3=) }}

for some reasons renders as

Deathbringer  (Death) trial
:{{linktext|Death|bringer |n2=(|Death|trial|n4=)}}

whereas I wanted it to does correctly render as

Deathbringer (Deathtrial)

though I will use the latter workaround for now, so nothing urgent for me.--Kiyoweap (talk) 23:45, 9 January 2023 (UTC) --Kiyoweap (talk) 18:23, 12 January 2026 (UTC)[reply]

This template should be deleted

This template is now used for adding tens of thousands of unnecessary (or not-very-necessary) Wiktionary links, especially in articles containing CJK terms. 172.56.232.78 (talk) 06:01, 20 February 2025 (UTC)[reply]

Upper and lower-case option

An upper to lowercase adjustment option would help in some situations
e.g.: in "Where the Buffalo Roam", the link should go to wikt:buffalo, the animal and not the City. --Kiyoweap (talk) 18:14, 12 January 2026 (UTC)[reply]

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.