Wiki source code of Language Macro
Version 27.2 by Thomas Mortagne on 2019/08/20
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | = Example = |
![]() |
25.1 | 2 | |
![]() |
1.1 | 3 | == Code == |
![]() |
25.1 | 4 | |
![]() |
1.1 | 5 | {{code}} |
6 | {{language codes='de, fr, it, lv, nl, ru, sv, zh'/}} | ||
7 | {{/code}} | ||
8 | |||
9 | == Result == | ||
10 | |||
![]() |
25.1 | 11 | {{language codes="de, fr, it, lv, nl, ru, sv, zh"/}} |
![]() |
1.1 | 12 | |
![]() |
25.1 | 13 | = Parameters = |
14 | |||
![]() |
1.1 | 15 | |= Parameter name |= Description |
16 | | codes | indicates the code list for the language | ||
17 | |||
18 | Codes that can be used: | ||
![]() |
25.1 | 19 | {{velocity}}|= Code |= Flag |= Language name |
![]() |
1.1 | 20 | #foreach($attachment in $doc.attachmentList) |
21 | #set($locale = $attachment.filename.substring(0, $attachment.filename.indexOf('.')).replace('-', '_')) | ||
22 | | $locale | image:$attachment.filename | $!{languages.get($locale).get(0)} | ||
![]() |
25.1 | 23 | #end{{/velocity}} |
![]() |
1.1 | 24 | |
25 | == References == | ||
![]() |
25.1 | 26 | |
![]() |
26.1 | 27 | The code is based on [[<language lower case>>>https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]]_[[<COUNTRY UPPER CASE>>>https://en.wikipedia.org/wiki/ISO_3166-1]] |
28 | |||
29 | This macro uses [[http://www.famfamfam.com/lab/icons/flags/]] icons. |