Difference between revisions of "Template:Translations/code"

From Creative Commons
Jump to: navigation, search
Line 7: Line 7:
 
         <td style="padding-right:10px; padding-top:4px; padding-bottom:4px;"><!--
 
         <td style="padding-right:10px; padding-top:4px; padding-bottom:4px;"><!--
 
         -->{{#if: {{{articles|}}}
 
         -->{{#if: {{{articles|}}}
               | {{#arraydefine:a<!--
+
               | {{#arraydefine:a|{{#arraymap:{{{articles|}}},{{FULLPAGENAME}}|,|@@@@| <span style="display:none">{{#language:{{#ask:[[:@@@@]]|?Has language#=}}}} </span>[[:@@@@ | {{#language: {{#ask:[[:@@@@]]|?Has language#=}} }}]]}}|,|unique,sort=asc}}{{#arrayprint:a|&nbsp;&nbsp;'''&bull;'''&nbsp;&#32;|@@@@|@@@@}}{{#arrayreset:a}}<!--
              -->|{{#arraymap:{{{articles|}}},{{FULLPAGENAME}}
 
                  -->|,<!--
 
                  -->|@@@@<!--
 
                      here add an artificail sort key, to sort alphabetically by language name
 
                      (final # separates key from name; space before separator is needed for sort)
 
                  -->|{{#language:{{#ask:[[:@@@@]]|?Has language#=}}}} #<!--
 
                  -->[[:@@@@ | {{#language: {{#ask:[[:@@@@]]|?Has language#=}} }}]]<!--
 
                -->}}<!--
 
              -->|,<!--
 
              -->|unique,sort=asc<!--
 
            -->}}<!--
 
            -->{{#arrayprint:a<!--
 
              -->|&nbsp;&nbsp;'''&bull;'''&nbsp;&#32;<!--
 
              -->|@@@@<!--
 
                  now remove the artificial sort key
 
              -->|{{#explode:@@@@|#|1}}<!--
 
            -->}}{{#arrayreset:a}}<!--
 
 
           -->| {{{message-no-known-translations|}}}
 
           -->| {{{message-no-known-translations|}}}
 
                 [[{{Translation of|Category:Untranslated}}]]
 
                 [[{{Translation of|Category:Untranslated}}]]

Revision as of 00:52, 28 April 2011

This is the code page for Template:Translations. Please refer to that template for instructions.