Template:Programming language: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (One last attempt at unwanted space removal.)
(Added Objective-C)
Line 1: Line 1:
{{#if: {{{1|}}}
{{#if: {{{1|}}}
   | {{#switch: {{lc:{{{1|}}}}}
   | {{#switch: {{lc:{{{1|}}}}}
       | c         ={{{pre|}}}C<!--
       | c           ={{{pre|}}}C<!--
                -->{{main other|[[Category:C software]]}}
                  -->{{main other|[[Category:C software]]}}
       | c++       ={{{pre|}}}C++<!--
       | c++         ={{{pre|}}}C++<!--
                -->{{main other|[[Category:C++ software]]}}
                  -->{{main other|[[Category:C++ software]]}}
       | fortran   ={{{pre|}}}FORTRAN<!--
       | fortran     ={{{pre|}}}FORTRAN<!--
                -->{{main other|[[Category:FORTRAN software]]}}
                  -->{{main other|[[Category:FORTRAN software]]}}
       | go         ={{{pre|}}}Go<!--
       | go         ={{{pre|}}}Go<!--
                -->{{main other|[[Category:Go software]]}}
                  -->{{main other|[[Category:Go software]]}}
       | java       ={{{pre|}}}Java<!--
       | java       ={{{pre|}}}Java<!--
                -->{{main other|[[Category:Java software]]}}
                  -->{{main other|[[Category:Java software]]}}
       | javascript ={{{pre|}}}JavaScript<!--
       | javascript ={{{pre|}}}JavaScript<!--
                -->{{main other|[[Category:JavaScript software]]}}
                  -->{{main other|[[Category:JavaScript software]]}}
       | nasal     ={{{pre|}}}Nasal<!--
       | nasal       ={{{pre|}}}Nasal<!--
                -->{{main other|[[Category:Nasal software]]}}
                  -->{{main other|[[Category:Nasal software]]}}
       | perl       ={{{pre|}}}Perl<!--
      | objective-C ={{{pre|}}}Objective-C<!--
                -->{{main other|[[Category:Perl software]]}}
                  -->{{main other|[[Category:Objective-C software]]}}
       | php       ={{{pre|}}}Php<!--
       | perl       ={{{pre|}}}Perl<!--
                -->{{main other|[[Category:Php software]]}}
                  -->{{main other|[[Category:Perl software]]}}
       | python     ={{{pre|}}}Python<!--
       | php         ={{{pre|}}}Php<!--
                -->{{main other|[[Category:Python software]]}}
                  -->{{main other|[[Category:Php software]]}}
       | ruby       ={{{pre|}}}Ruby<!--
       | python     ={{{pre|}}}Python<!--
                -->{{main other|[[Category:Ruby software]]}}
                  -->{{main other|[[Category:Python software]]}}
       | r         ={{{pre|}}}R<!--
       | ruby       ={{{pre|}}}Ruby<!--
                -->{{main other|[[Category:R software]]}}
                  -->{{main other|[[Category:Ruby software]]}}
       | shell     ={{{pre|}}}Shell script<!--
       | r           ={{{pre|}}}R<!--
                -->{{main other|[[Category:Shell script software]]}}
                  -->{{main other|[[Category:R software]]}}
       | swift     ={{{pre|}}}Swift<!--
       | shell       ={{{pre|}}}Shell script<!--
                -->{{main other|[[Category:Swift software]]}}
                  -->{{main other|[[Category:Shell script software]]}}
       | #default   ={{{pre|}}}{{{1}}}<!--
       | swift       ={{{pre|}}}Swift<!--
                -->{{main other|[[Category:Unknown software]]}}
                  -->{{main other|[[Category:Swift software]]}}
       | #default   ={{{pre|}}}{{{1}}}<!--
                  -->{{main other|[[Category:Unknown software]]}}
     }}
     }}
}}<noinclude>
}}<noinclude>

Revision as of 13:08, 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

This should fail - the list should be processed using the #titleparts parser function upstream.

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

C/C++/Nasal