Rosetta Code:Village Pump/Language template enhancements: Difference between revisions

(→‎Language template wishlist: language tags: Simply make it a template parameter)
Line 17:
* Language tag (If someone has a good idea how to do this, I'm all ears. It's non-trivial to map backwards from a language name to the appropriate GeSHi language file, as some languages have duplicate files, and most languages on Rosetta Code aren't supported at all.)
** The simplest solution would be to just have an optional list of language tags passed as optional template argument. That is, you could e.g. include the template in the Java category as <nowiki>{{language|java, java5}}</nowiki>, and the result would be that a line "Language tags: java, java5" appeared in the box. --[[User:Ce|Ce]] 07:02, 15 May 2009 (UTC)
:These can mostly be done with named parameters. The official site and language tags would be easiest. After all the parameters are passed in they can be added to a more spiffy looking div box with <nowiki><small> text</nowiki> showing all of the parameters like this:
<div class="infobox" style="width: 2in">
<big>'''Language name'''</big>
 
Text about the language.
 
<small>Official site: [http://example.com link]<br>
Type checking: static/dynamic<br>
Garbage collected: yes/no<br>
Lang tags: option1, option2<br>
More features...</small>
</div>
:They could all be conditional. The language template code will probably look ugly, but the div box will look sweet.--[[User:Mwn3d|Mwn3d]] 15:33, 5 June 2009 (UTC)
Anonymous user