Difference between revisions of "Template:I18N-yn"

From The DarkMod Wiki
Jump to navigationJump to search
m (add)
 
(fix)
Line 10: Line 10:
 
  |{{I18N-yes}}
 
  |{{I18N-yes}}
 
  |{{I18N-no}}
 
  |{{I18N-no}}
  |{{I18N-ny|bg=#d02020|text=No}}
+
  |{{I18N-yn|bg=#d02020|text=No}}
 
  |}
 
  |}
 
  </nowiki>
 
  </nowiki>
Line 21: Line 21:
 
|{{I18N-yes}}
 
|{{I18N-yes}}
 
|{{I18N-no}}
 
|{{I18N-no}}
|{{I18N-ny|bg=#d02020|text=No}}
+
|{{I18N-yn|bg=#d02020|text=No}}
 
|}
 
|}
  
Line 52: Line 52:
  
 
|}
 
|}
</noinclude><includeonly>|align="center" style="background:{{{bg|#20d020}}}"| <span style="color: {{{fg|#f0f0f0}}}">{{{text|{{{1}}}|Y}}}</span></includeonly>
+
</noinclude><includeonly>|align="center" style="background:{{{bg|#20d020}}}"|<span style="color: {{{fg|#f0f0f0}}}">{{{text|{{{1}}}|Y}}}</span></includeonly>

Revision as of 11:11, 9 November 2012

Usage

This template adds a colored table cell with some text. The two variants "yes" and "no" use red and green and "Y" and "N" as text.

 {|
 |-
 !A Special Delivery
 |{{I18N-yes}}
 |{{I18N-no}}
 |{{I18N-yn|bg=#d02020|text=No}}
 |}
 

Here is how that looks:

A Special Delivery Yes No align="center" style="background:#d02020"|No

Parameters

This template takes the following parameters:

Name Example Description
text {{i18n-yn|text=Yes}} Optional. The text to display. If omitted, "Y" is shown.
bg {{i18n-yn|bg=#404040|text=Warning!}} Optional. The background color. If omitted, #20d020 (green) is used
fg {{i18n-yn|fg=#ff3030|text=Warning!}} Optional. The foreground (or text) color. If omitted, #f0f0f0 (off-white) is used.