Template: License

From LibrePlanet
Jump to: navigation, search
(Create License template for linking to the description of a software's license.)
 
(Fix switch)
Line 6: Line 6:
 
Simply pass the type of license you need as the template argument.
 
Simply pass the type of license you need as the template argument.
  
Example: <nowiki><pre>{{License|GPL}}</pre></nowiki>
+
Example: <nowiki>{{License|GPL}}</nowiki>
  
 
== Available Licenses ==
 
== Available Licenses ==
Line 42: Line 42:
 
<includeonly>
 
<includeonly>
 
<span class="license">
 
<span class="license">
<a href="http://www.gnu.org/licenses/license-list.html#{#switch {{{1|}}}
+
<a href="http://www.gnu.org/licenses/license-list.html#{{#switch {{{1|}}}
 
| GPLv2  = GPLv2">GNU <abbr title="General Public License">GPL</abbr> version 2
 
| GPLv2  = GPLv2">GNU <abbr title="General Public License">GPL</abbr> version 2
 
| GPLv2+  = GPLv2">GNU <abbr title="General Public License">GPL</abbr> version 2 or later
 
| GPLv2+  = GPLv2">GNU <abbr title="General Public License">GPL</abbr> version 2 or later
Line 50: Line 50:
 
| Apache2 = apache2">Apache License, version 2.0
 
| Apache2 = apache2">Apache License, version 2.0
 
|#default = SoftwareLicenses">{{{1|not specified}}}
 
|#default = SoftwareLicenses">{{{1|not specified}}}
}</a>
+
}}</a>
 
</span>
 
</span>
 
</includeonly>
 
</includeonly>

Revision as of 10:08, 24 October 2015

This is a template to display software license information and link to the original license text.

Usage

Simply pass the type of license you need as the template argument.

Example: {{License|GPL}}

Available Licenses

Note: keywords are case-sensitive.

Any anchor on the GNU licenses page can be used as a keyword.

Keyword License Name
GPLv2 GNU General Public License version 2 (only)
GPLv2+ GNU General Public License version 2 or later
GPLv3+ GNU General Public License version 3 or later
GPL GNU General Public License (ultimate version, eq. GPLv3+)
AGPL GNU Affero General Public License
Apache2 Apache License version 2.0