Difference between revisions of "Template:Translations/code"
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|{{#arraymap:{{{articles|}}},{{FULLPAGENAME}}|,|@@@@ | + | | {{#arraydefine: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<!-- | ||
+ | -->| '''•'''  <!-- | ||
+ | -->|@@@@<!-- | ||
+ | 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 23:49, 27 April 2011
This is the code page for Template:Translations. Please refer to that template for instructions.