Difference between revisions of "Template:Infobox language/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Wikid77
(restored from current template)
imported>Wikid77
(used {padleft:|4|{date} } to extract year, had been {template:str_number/trim|...}, to reduce expansion depth to 11 was 23 levels.)
Line 68: Line 68:
 
       |{{#ifeq: {{{date}}}|no date|{{{speakers|–}}} &nbsp;(no date)|<!--
 
       |{{#ifeq: {{{date}}}|no date|{{{speakers|–}}} &nbsp;(no date)|<!--
 
The following changes the display depending on the age of the data. Limit set initially to 30 years, as a population can double in that time.  
 
The following changes the display depending on the age of the data. Limit set initially to 30 years, as a population can double in that time.  
-->{{#if:{{{date|}}}|{{#iferror:(({{CURRENTYEAR}} - {{Str number/trim|{{{date}}}}}) < 30)||{{#ifexpr:(({{CURRENTYEAR}} - {{Str number/trim|{{{date}}}}}) < 30)<!--
+
-->{{#if:{{{date|}}}|{{#iferror:{{#expr: {{padleft:|4|{{{date}}}|}} }}||{{#ifexpr:(({{CURRENTYEAR}} - {{padleft:|4|{{{date}}}|}}) < 30)<!--
 
     -->|<!-- regular-->{{{speakers|–}}} &nbsp;({{{date}}})<!--
 
     -->|<!-- regular-->{{{speakers|–}}} &nbsp;({{{date}}})<!--
 
     -->|<!-- old (30+) --> ({{{speakers}}} cited {{{date}}})[[category:Language articles with old speaker data]]}}}}<!--(end ifexpr:30+, iferror:)
 
     -->|<!-- old (30+) --> ({{{speakers}}} cited {{{date}}})[[category:Language articles with old speaker data]]}}}}<!--(end ifexpr:30+, iferror:)
Line 309: Line 309:
  
 
-->{{#ifeq:{{lc:{{{iso3|}}}}}|none|{{main other|{{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|black|1}}|[[Category:Conlangs without ISO 639-3 code]]|[[Category:Languages without ISO 639-3 code]]}}}}}}<!--
 
-->{{#ifeq:{{lc:{{{iso3|}}}}}|none|{{main other|{{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|black|1}}|[[Category:Conlangs without ISO 639-3 code]]|[[Category:Languages without ISO 639-3 code]]}}}}}}<!--
-->{{#if:{{{date|}}}|{{#iferror: {{#expr: ({{CURRENTYEAR}} - {{Str number/trim|{{{date}}}}}) < 30 }} |<!--
+
-->{{#if:{{{date|}}}|{{#iferror: {{#expr: {{padleft:|4|{{{date}}}|}} }} |<!--
 
   -->{{#switch: {{lc:{{{date}}}}}
 
   -->{{#switch: {{lc:{{{date}}}}}
 
   | na      = [[Category:Language articles with NA population dates]]
 
   | na      = [[Category:Language articles with NA population dates]]
Line 333: Line 333:
 
-->{{#ifeq:{{Trunc|{{{image|}}}|6}}|image:|[[Category:Ill-formatted infobox-language images]]|<!--ok-->}}<!--
 
-->{{#ifeq:{{Trunc|{{{image|}}}|6}}|image:|[[Category:Ill-formatted infobox-language images]]|<!--ok-->}}<!--
 
-->{{#if:{{{caption|}}}{{{map_caption|}}}{{{rank|}}}{{{country|}}}{{{regions|}}}{{{status|}}}{{{SIL|}}}{{{sil|}}}{{{silname|}}}{{{child1|}}}{{{child2|}}}{{{children|}}}{{{iso5|}}}|[[Category:Language articles with unsupported infobox fields]]|<!--ok-->}}<!--
 
-->{{#if:{{{caption|}}}{{{map_caption|}}}{{{rank|}}}{{{country|}}}{{{regions|}}}{{{status|}}}{{{SIL|}}}{{{sil|}}}{{{silname|}}}{{{child1|}}}{{{child2|}}}{{{children|}}}{{{iso5|}}}|[[Category:Language articles with unsupported infobox fields]]|<!--ok-->}}<!--
--><noinclude>{{documentation}}</noinclude>
+
--><noinclude>
 +
<!--
 +
{{documentation}}</noinclude>

Revision as of 00:44, 8 November 2012

Infobox language/sandbox
Language family
Default
  • Infobox language/sandbox
Language codes
ISO 639-3