Template:Programming language: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Only process the parameter if given.)
(Introduction of the 'pre' parameter to allow for list formatting.)
Line 1: Line 1:
{{#if: {{{1|}}}
{{#if: {{{1|}}}
   | {{#switch: {{lc:{{{1|}}}}}
   | {{#switch: {{lc:{{{1|}}}}}
       | c          = C                {{main other|[[Category:C software]]}}
       | c          = {{{pre|}}}C                {{main other|[[Category:C software]]}}
       | c++        = C++              {{main other|[[Category:C++ software]]}}
       | c++        = {{{pre|}}}C++              {{main other|[[Category:C++ software]]}}
       | fortran    = FORTRAN          {{main other|[[Category:FORTRAN software]]}}
       | fortran    = {{{pre|}}}FORTRAN          {{main other|[[Category:FORTRAN software]]}}
       | go        = Go              {{main other|[[Category:Go software]]}}
       | go        = {{{pre|}}}Go              {{main other|[[Category:Go software]]}}
       | java      = Java            {{main other|[[Category:Java software]]}}
       | java      = {{{pre|}}}Java            {{main other|[[Category:Java software]]}}
       | javascript = JavaScript      {{main other|[[Category:JavaScript software]]}}
       | javascript = {{{pre|}}}JavaScript      {{main other|[[Category:JavaScript software]]}}
       | nasal      = Nasal            {{main other|[[Category:Nasal software]]}}
       | nasal      = {{{pre|}}}Nasal            {{main other|[[Category:Nasal software]]}}
       | perl      = Perl            {{main other|[[Category:Perl software]]}}
       | perl      = {{{pre|}}}Perl            {{main other|[[Category:Perl software]]}}
       | php        = Php              {{main other|[[Category:Php software]]}}
       | php        = {{{pre|}}}Php              {{main other|[[Category:Php software]]}}
       | python    = Python          {{main other|[[Category:Python software]]}}
       | python    = {{{pre|}}}Python          {{main other|[[Category:Python software]]}}
       | ruby      = Ruby            {{main other|[[Category:Ruby software]]}}
       | ruby      = {{{pre|}}}Ruby            {{main other|[[Category:Ruby software]]}}
       | r          = R                {{main other|[[Category:R software]]}}
       | r          = {{{pre|}}}R                {{main other|[[Category:R software]]}}
       | shell      = Shell script    {{main other|[[Category:Shell script software]]}}
       | shell      = {{{pre|}}}Shell script    {{main other|[[Category:Shell script software]]}}
       | swift      = Swift            {{main other|[[Category:Swift software]]}}
       | swift      = {{{pre|}}}Swift            {{main other|[[Category:Swift software]]}}
       | #default  = Unknown software {{main other|[[Category:Unknown software]]}}
       | #default  = {{{pre|}}}Unknown software {{main other|[[Category:Unknown software]]}}
     }}
     }}
}}
}}
Line 29: Line 29:
  {{obr}}'''programming language'''
  {{obr}}'''programming language'''
  {{!}} language            =  
  {{!}} language            =  
{{!}} ''pre''                =
  {{cbr}}
  {{cbr}}


; language:  The string representation of the programming language.  Capitalisation is ignored.
; language:  The string representation of the programming language.  Capitalisation is ignored.
; pre:  Text to prefix prior to the link text.  This is useful for creating lists.


== Examples ==
== Examples ==
Line 50: Line 53:


{{programming language|Nasal}}
{{programming language|Nasal}}
=== Multiple languages ===
  {{obr}}programming language{{!}}C/C++/Nasal{{cbr}}
{{programming language|C/C++/Nasal}}


}}
}}

Revision as of 12:42, 11 September 2020



The following template description is not displayed when the template is inserted in an article.

Goal

This template is used to process programming language strings to return standardised names and categories.

Usage

Add this to the top of the article describing the software.

{{programming language
| language            = 
| pre                = 
}}
language
The string representation of the programming language. Capitalisation is ignored.
pre
Text to prefix prior to the link text. This is useful for creating lists.

Examples

C++

  {{programming language|C++}}

C++


  {{programming language|c++}}

C++


Nasal

  {{programming language|Nasal}}

Nasal


Multiple languages

  {{programming language|C/C++/Nasal}}

Unknown software