Difference between revisions of "Template:Gcl/doc"
imported>Uanfala m (typo) |
imported>Uanfala (tweak after move of Module:Interlinear) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| − | {{Lua|Module: | + | {{Lua|Module:Interlinear}} |
| − | This templates formats a single linguistic [[glossing abbreviation]] (a '''g'''rammatical '''c'''ategory '''l'''abel): <code><nowiki>{{gcl|CONT}}</nowiki></code> produces: {{gcl|CONT}}. Hovering the mouse over the abbreviation displays a tooltip with its meaning, in this case this is "continuous". To specify a meaning different from the default one,<ref>The default assignments come from [[Module: | + | This templates formats a single linguistic [[glossing abbreviation]] (a '''g'''rammatical '''c'''ategory '''l'''abel): <code><nowiki>{{gcl|CONT}}</nowiki></code> produces: {{gcl|CONT}}. Hovering the mouse over the abbreviation displays a tooltip with its meaning, in this case this is "continuous". To specify a meaning different from the default one,<ref>The default assignments come from [[Module:Interlinear/data|the module data page]].</ref> pass it as a second parameter after the abbreviation itself: <code><nowiki>{{gcl|CONT|continuative}}</nowiki></code> gives: {{gcl|CONT|continuative}}. |
The abbreviation will be rendered as a link to the relevant article if the {{para|glossing}} parameter is set to {{code|wikilink}}, thus <code><nowiki>{{gcl|CLF|glossing=wikilink}}</nowiki></code> gives: {{gcl|CLF|glossing=wikilink}}. The wikipedia article is specified by the third parameter: <code><nowiki>{{gcl|classifier|Chinese classifier}}</nowiki></code> gives: {{gcl|CLF|classifier|Chinese classifier}}. The presence of this third parameter (even if empty) will force the abbreviation to be displayed as a wikilink – <code><nowiki>{{gcl|CLF||}}</nowiki></code> is equivalent to <code><nowiki>{{gcl|CLF|glossing=wikilink}}</nowiki></code>. | The abbreviation will be rendered as a link to the relevant article if the {{para|glossing}} parameter is set to {{code|wikilink}}, thus <code><nowiki>{{gcl|CLF|glossing=wikilink}}</nowiki></code> gives: {{gcl|CLF|glossing=wikilink}}. The wikipedia article is specified by the third parameter: <code><nowiki>{{gcl|classifier|Chinese classifier}}</nowiki></code> gives: {{gcl|CLF|classifier|Chinese classifier}}. The presence of this third parameter (even if empty) will force the abbreviation to be displayed as a wikilink – <code><nowiki>{{gcl|CLF||}}</nowiki></code> is equivalent to <code><nowiki>{{gcl|CLF|glossing=wikilink}}</nowiki></code>. | ||
Revision as of 17:02, 24 November 2018
| This is a documentation subpage for Template:Gcl. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
This templates formats a single linguistic glossing abbreviation (a grammatical category label): {{gcl|CONT}} produces: CONT. Hovering the mouse over the abbreviation displays a tooltip with its meaning, in this case this is "continuous". To specify a meaning different from the default one,[1] pass it as a second parameter after the abbreviation itself: {{gcl|CONT|continuative}} gives: CONT.
The abbreviation will be rendered as a link to the relevant article if the |glossing= parameter is set to wikilink, thus {{gcl|CLF|glossing=wikilink}} gives: CLF. The wikipedia article is specified by the third parameter: {{gcl|classifier|Chinese classifier}} gives: CLF. The presence of this third parameter (even if empty) will force the abbreviation to be displayed as a wikilink – {{gcl|CLF||}} is equivalent to {{gcl|CLF|glossing=wikilink}}.
This template is mainly used within {{interlinear}}. It will exempt its content from the default glossing behaviour in the interlinear text. This can be needed in several circumstances:
- to set the meaning of an abbreviation that is otherwise not recognised;
- to use an abbreviation with a meaning different from the default one, or linking to a different article from the default one;
- to apply formatting to a portion of a glossing abbreviation (within
{{interlinear}}this would prevent the abbreviation from being recognised); - to exempt an abbreviation from the default
{{interlinear}}formatting. To this end, two further values of the|glossing=parameter can be used:|glossing=no linkwill force the use of the default formatting as an abbreviation with a tooltip, without turning it into a wikilink;|glossing=no abbrwill only format the label in small caps without treating it as an abbreviation. Additional CSS styles[2] can be set using the|style=parameter.
To prevent a string from being treated as a glossing label at all, use {{no gloss}}.
Notes
- ↑ The default assignments come from the module data page.
- ↑ See https://www.w3schools.com/html/html_styles.asp, with the caveat that not all html features are available in wikitext, see Help:HTML in wikitext.