Difference between revisions of "Module:English variant notice/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Galobtter
(update)
m (17 revisions imported)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Module rating|beta}}
+
{{high use|25000+}}
{{high use|20000+}}
 
  
Module is used the major english variant notices.
+
This module is for generating various english variant notice templates.
  
Automatically generates "variant" from title template that invokes it (e.g invoking from "Template:American English" gives "American English" as variant). If {{para|Editnotice_cat}} is set to yes then it categorizes in the edit notice category when it used as an edit notice.
+
Automatically generates "variant" from title template that invokes it (e.g invoking from "Template:American English" gives "American English" as variant).
  
 +
All templates using this support a {{para|Oxford}} parameter for oxford spelling and {{para|IUPAC}} automatically.
  
<!--
 
 
== Usage ==
 
== Usage ==
  
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''function_name''}}</code>-->
+
* '''small''', '''form''', and '''including''' &nbsp;– unnecessary to use in templates as grabbed when passed in from talk pages
 +
* '''id'''&nbsp;– the HTML id used in editnotices; "editnotice" is automatically appended
 +
* '''image'''&nbsp;– name of file to be used as an icon, without the File: prefix.
 +
* '''variant'''&nbsp;– defaults to the template name; the variant of English, which should be a Wikipedia article.
 +
* '''spelling examples'''&nbsp;–gives spelling examples in parentheses
 +
* '''compare'''&nbsp;–comparison variants of english
 +
* '''text'''&nbsp;– custom text, set only if required to be different from the default
 +
* '''doc''' if set to no, will not load the automatic documentation at [[Template:English variant notice/documentation]]
 +
* '''editnotice_cat''' if set to yes, categorizes in edit notice category
 +
* '''nocat''' disables documentation if set to true
 +
* '''doc''' if set to no, disables automatic documentation on template pages
 +
* '''size''' set the size of the image (example: {{para|size|60px}})
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
+
=== Example ===
<!-- Categories below this line, please; interwikis at Wikidata -->
+
As of March 2018, [[Template:Hiberno-English]] uses the following parameters:
 +
<pre>{{#invoke:English variant notice|main
 +
| id    = hie
 +
| image  = Four Provinces Flag.svg{{!}}border
 +
| spelling_examples = ''colour'', ''realise'', ''travelled''
 +
| compare = [[British English|English]], [[Scottish English|Scottish]], and
 +
}}
 +
</pre>
 +
which produces:
 +
{{#invoke:English variant notice|main
 +
| id    = hie
 +
| image  = Four Provinces Flag.svg{{!}}border
 +
| spelling_examples = ''colour'', ''realise'', ''travelled''
 +
| compare = [[British English|English]], [[Scottish English|Scottish]], and
 +
| variant = Hiberno-English
 +
}}
  
}}</includeonly>
+
== See also ==
 +
* The <nowiki>{{</nowiki>[[Template:Use X English|Use {{var|X}} English]]<nowiki>}}</nowiki> templates

Latest revision as of 16:28, 26 September 2020

This module is for generating various english variant notice templates.

Automatically generates "variant" from title template that invokes it (e.g invoking from "Template:American English" gives "American English" as variant).

All templates using this support a |Oxford= parameter for oxford spelling and |IUPAC= automatically.

Usage

  • small, form, and including  – unnecessary to use in templates as grabbed when passed in from talk pages
  • id – the HTML id used in editnotices; "editnotice" is automatically appended
  • image – name of file to be used as an icon, without the File: prefix.
  • variant – defaults to the template name; the variant of English, which should be a Wikipedia article.
  • spelling examples –gives spelling examples in parentheses
  • compare –comparison variants of english
  • text – custom text, set only if required to be different from the default
  • doc if set to no, will not load the automatic documentation at Template:English variant notice/documentation
  • editnotice_cat if set to yes, categorizes in edit notice category
  • nocat disables documentation if set to true
  • doc if set to no, disables automatic documentation on template pages
  • size set the size of the image (example: |size=60px)

Example

As of March 2018, Template:Hiberno-English uses the following parameters:

{{#invoke:English variant notice|main
| id     = hie
| image  = Four Provinces Flag.svg{{!}}border
| spelling_examples = ''colour'', ''realise'', ''travelled''
| compare = [[British English|English]], [[Scottish English|Scottish]], and
}}

which produces:

See also