Template:Infobox language: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 45: Line 45:
       -->
       -->
|<!-- SPOKEN language (not silver) -->{{#if:{{{speakers|}}}|{{#ifeq: {{lc:{{{date}}}}}|na|{{{speakers|–}}}  
|<!-- SPOKEN language (not silver) -->{{#if:{{{speakers|}}}|{{#ifeq: {{lc:{{{date}}}}}|na|{{{speakers|–}}}  
       |{{#ifeq: {{{date}}}|no date|{{{speakers|–}}} &nbsp;(no date)|<!--
       |{{#ifeq: {{{date}}}|no date|{{{speakers|–}}} &nbsp;(no date)|{{#ifeq:{{{speakers}}}|?|(unknown)
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:{{#expr: {{padleft:|4|{{{date}}}|}} }}||{{#ifexpr:(({{CURRENTYEAR}} - {{padleft:|4|{{{date}}}|}}) < 30)<!--
    -->|<!-- regular-->{{{speakers|–}}} &nbsp;({{{date}}})<!--
    -->|<!-- old (30+) --> ({{{speakers}}} cited {{{date}}})[[category:Language articles with old speaker data]]}}}}<!--(end ifexpr:30+, iferror:)
    -->|{{#ifeq:{{{speakers}}}|?|(unknown)
       |{{#ifeq:{{{speakers}}}|none|''None''
       |{{#ifeq:{{{speakers}}}|none|''None''
       |<!-- no date input -->{{{speakers|–}}} &nbsp;(''date missing'')[[Category:Language articles with speaker number undated]]}} }} }}<!--(end if:date, before the 30+ expr check)
       |<!-- no date input -->{{{speakers|–}}} &nbsp;(''date missing'')}} }}<!--(end if:date, before the 30+ expr check)
     -->}}<!--(end ifeq:date=no date)
     -->}}<!--(end ifeq:date=no date)
     -->}}<!--(end ifeq:date=na)
     -->}}<!--(end ifeq:date=na)
139,487

edits