Difference between revisions of "Template:Linktext/doc"

From blackwiki
Jump to navigation Jump to search
imported>Shāntián Tàiláng
(→‎Usage: category fix)
imported>Geekdiva
(Added to See also section. Created intro. Improved Usage language a little in the first two paragraphs & added helpful hatnotes. || 📍NOTE📍 The Usage section's info explaining pref, n#, and lim is not sufficient. The Examples section worsens the problem: Why use n2 before using n1? The parameter lim is not mentioned at all.)
 
Line 3: Line 3:
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
__NOTOC__
 
__NOTOC__
 +
{{For|linking from one Wikimedia project to another (e.g. Wikipedia to Wiktionary)|Help:Interwikimedia links}}
 +
{{For|a list of interlanguage codes|List of ISO 639-1 codes|meta:List of Wikipedias}}
 +
 +
{{Linking and page manipulation|linking and diffs}}
 +
The {{tl|Linktext}} template creates [[Wikipedia:INLINE|inline links]] for text within the template's parameters. Each word separately links to a page with a title that matches that word on Wiktionary, by default, or on any other [[Interwiki links|interwiki]] or [[Help:Interlanguage links|interlanguage Wikipedias]].
 +
 +
Interlanguage links on general are links from a page in one [[Wikipedia]] in one language to a page in another Wikipedia in another language.
 +
 
== Usage ==
 
== Usage ==
Links text, word by word to Wiktionary, or any other interwikis or interlangs.
+
The default target that this template links to is [[Wikipedia:Wiktionary|Wiktionary]]. To change the target, set the parameter '''pref''' to some other value. For example, "c" for commons, or "th" for Thai Wikipedia.
 
 
The default target is Wiktionary. To change it, set the parameter '''pref''' to some other value. For example, "c" for commons, or "th" for Thai Wikipedia.
 
  
 
Use the arguments '''n1''', '''n2''', '''n3''', etc. to specify items that should not be linked.  Regular spaces will be removed from the beginning and end of these; if you must have spaces, use &amp;#32; instead.   
 
Use the arguments '''n1''', '''n2''', '''n3''', etc. to specify items that should not be linked.  Regular spaces will be removed from the beginning and end of these; if you must have spaces, use &amp;#32; instead.   
Line 37: Line 43:
  
 
== See also ==
 
== See also ==
 +
* {{tl|Interlanguage link}}
 +
* {{tl|Sister project}}
 +
* {{tl|Sister-inline}}
 +
* [[Help:Contents/Links]]
 +
* [[Help:Interwikimedia links]]
 +
* [[Help:Interlanguage links]]
 +
* [[Wikipedia:List of templates linking to other free content projects]]
 
* [[Wikipedia:Wikimedia sister projects]]
 
* [[Wikipedia:Wikimedia sister projects]]
 +
* [[:Category:Interwiki link templates]]
 +
* [[meta:List of Wikipedias]]
 +
* [[m:Interwiki map]]
 +
* [[Wikipedia:Translation]]
 +
* [[Wikipedia:Babel]] – Userpage language proficiency banners
  
 
{{Wiktionary templates common doc}}
 
{{Wiktionary templates common doc}}
 
+
{{Wikipedia technical help}}
 +
{{Manual of Style}}
 
<includeonly>{{Sandbox other||
 
<includeonly>{{Sandbox other||
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
{{DEFAULTSORT:Linktext}}
 
{{DEFAULTSORT:Linktext}}
 
[[Category:Wiktionary link templates]]
 
[[Category:Wiktionary link templates]]
 +
[[Category:Wikipedia-related projects|Sister projects]]
 
[[Category:Chinese multilingual support templates]]
 
[[Category:Chinese multilingual support templates]]
 
[[Category:Japonic multilingual support templates]]
 
[[Category:Japonic multilingual support templates]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 01:20, 30 September 2020

The {{Linktext}} template creates inline links for text within the template's parameters. Each word separately links to a page with a title that matches that word on Wiktionary, by default, or on any other interwiki or interlanguage Wikipedias.

Interlanguage links on general are links from a page in one Wikipedia in one language to a page in another Wikipedia in another language.

Usage

The default target that this template links to is Wiktionary. To change the target, set the parameter pref to some other value. For example, "c" for commons, or "th" for Thai Wikipedia.

Use the arguments n1, n2, n3, etc. to specify items that should not be linked. Regular spaces will be removed from the beginning and end of these; if you must have spaces, use &#32; instead.

If you want to have a delimiter, such as ",&#32;", appear between links, specify the delimiter with lim.

If desired, you can specify the language code with lang (rationale explained here). This is not required if Template:Linktext is used inside a template that specifies the language, such as Template:Zh.

Examples

{{Linktext|This| is| a| test}}
This is a test
{{Linktext|This| is|n2=&#32;not| a| test}}
This is not a test

Also can be used to wikt-link individual Chinese characters:

{{linktext|雲|居|道|膺}}

Examples of result of specifying "lang" (differences in characters explained here and here):

{{Linktext|雲|緑|lang=ja}}
{{Linktext|雲|緑|lang=zh}}

See also

Template:Wiktionary templates common doc