Ajuda:Multilanguage infobox images
Examples
[modifica]In these examples are used
- Module:Infobox images demo 1 with items and i18n, allows only one image.
- Module:Infobox images demo 2 with items and i18n, allows up to two images.
In both cases the default width for images has been set to 150px (the usually default width is 300px).
{{#invoke:Infobox images demo 1|infobox|
|allitems=params
}}
M. | P. | Key | Default names | Localized names (i18n) | Values | WD content (ca) | T. |
---|---|---|---|---|---|---|---|
IMI | 1 | name | Name, name | s | |||
GIBT | 2 | image | image, Image | imatge | WD P18 | Imatge | s |
GIBT | 3 | image_idx | image_idx | imatge_idx | i+ | ||
GIBT | 4 | alt | alt | s | |||
GIBT | 5 | size | size, width | mida, amplada | s | ||
GIBT | 6 | caption | caption, Caption | peu | WD P18,P2096 | P18,P2096 | s |
M.: Abbreviation of the used module/s. P.: Position according to the appearance order in the infobox
You can change the localizated text in:
Used argument types: s (string), i+ (positive integer)
{{#invoke:Infobox images demo 2|infobox|
|allitems=params
}}
M. | P. | Key | Default names | Localized names (i18n) | Values | WD content (ca) | T. |
---|---|---|---|---|---|---|---|
IMI | 1 | name | Name, name | s | |||
GIBT | 2 | image1 | image, Image, image1, Image1 | imatge, imatge1 | WD P18 | Imatge | s |
GIBT | 3 | image_idx1 | image_idx1 | imatge_idx1 | i+ | ||
GIBT | 4 | alt1 | alt, alt1 | s | |||
GIBT | 5 | size1 | size, width, size1, width1 | mida, amplada, mida1, amplada1 | s | ||
GIBT | 6 | caption1 | caption, Caption, caption1, Caption1 | peu, peu1 | WD P18,P2096 | P18,P2096 | s |
GIBT | 7 | image2 | image2, Image2 | imatge2 | s | ||
GIBT | 8 | image_idx2 | image_idx2 | imatge_idx2 | i+ | ||
GIBT | 9 | alt2 | alt2 | s | |||
GIBT | 10 | size2 | size2, width2 | mida2, amplada2 | s | ||
GIBT | 11 | caption2 | caption2, Caption2 | peu2 | s |
M.: Abbreviation of the used module/s. P.: Position according to the appearance order in the infobox
You can change the localizated text in:
Used argument types: s (string), i+ (positive integer)
Directly
[modifica]Without caption
![]() |
{{#invoke:Infobox images demo 1|infobox|
|image=Example title.svg
}}
Changing width
![]() |
{{#invoke:Infobox images demo 1|infobox|
|image=Example title.svg
|size=250px
}}
With caption
![]() Example |
{{#invoke:Infobox images demo 1|infobox|
|image=Example title.svg
|caption=Example
}}
Two images with caption
![]() Example 1 | |
![]() Example 2 |
{{#invoke:Infobox images demo 2|infobox|
|image1=SVG Example1.svg
|caption1=Example 1
|image2=SVG Example2.svg
|caption2=Example 2
}}
Using Wikidata
[modifica]Always appears the pencil to link Wikidata below of last image or caption.
Only with one image
In Catalan WP exists legend for first image, then it is displayed
![]() Un pacient amb la malaltia de Hand-Schüller-Christian que és un subtipus d’histiocitosi de cèl·lules de Langerhans. ![]() |
{{#invoke:Infobox images demo 1|infobox|
|item=Q374036
}}
In this language doesn't exist a legend
![]() ![]() |
{{#invoke:Infobox images demo 1|infobox|
|item=Q374036
|lang=as
}}
If you do not want the image to appear
{{#invoke:Infobox images demo 1|infobox|
|item=Q374036
|image=NONE
}}
Custom message is not displayed when image is load from WD
![]() Un pacient amb la malaltia de Hand-Schüller-Christian que és un subtipus d’histiocitosi de cèl·lules de Langerhans. ![]() |
{{#invoke:Infobox images demo 1|infobox|
|item=Q374036
|caption=A caption
}}
The selected image is the second one in WD
![]() |
{{#invoke:Infobox images demo 1|infobox|
|item=Q374036
|image_idx = 2
}}
With two first images
Existing in WD for this item
![]() Un pacient amb la malaltia de Hand-Schüller-Christian que és un subtipus d’histiocitosi de cèl·lules de Langerhans. | |
![]() |
{{#invoke:Infobox images demo 2|infobox|
|item=Q374036
}}
Changing the order of images in WD
![]() Lesions estelades de la histiocitosi de cèl·lules de Langerhans | |
![]() Un pacient amb la malaltia de Hand-Schüller-Christian que és un subtipus d’histiocitosi de cèl·lules de Langerhans. ![]() |
{{#invoke:Infobox images demo 2|infobox|
|item=Q374036
|image_idx1 = 2
|image_idx2 = 1
}}
Without the first image of WD
![]() |
{{#invoke:Infobox images demo 2|infobox|
|item=Q374036
|image_idx1 = 2
|image_idx2 = 0
}}
Mixed displayed images (manually and from WD)
![]() Un pacient amb la malaltia de Hand-Schüller-Christian que és un subtipus d’histiocitosi de cèl·lules de Langerhans. | |
![]() ![]() |
{{#invoke:Infobox images demo 2|infobox|
|item=Q374036
|image1=SVG Example1.svg
}}
![]() Example 1 | |
![]() Un pacient amb la malaltia de Hand-Schüller-Christian que és un subtipus d’histiocitosi de cèl·lules de Langerhans. ![]() |
{{#invoke:Infobox images demo 2|infobox|
|item=Q374036
|image1=SVG Example1.svg
|caption1=Example 1
}}
![]() Example 1 | |
![]() |
{{#invoke:Infobox images demo 2|infobox|
|item=Q374036
|image1=SVG Example1.svg
|caption1=Example 1
|image_idx2 = 2
}}
![]() Un pacient amb la malaltia de Hand-Schüller-Christian que és un subtipus d’histiocitosi de cèl·lules de Langerhans. ![]() |
{{#invoke:Infobox images demo 2|infobox|
|item=Q374036
|image1=Hans-Schuller-Christian.jpg
}}