Template:I18n: Difference between revisions

From eMushpedia
Jump to navigation Jump to search
imported>Septembre
Affinage
imported>Septembre
m ajout léger padding
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<onlyinclude><includeonly><div>{{#switch:{{{1}}}
<onlyinclude><includeonly><div style="padding-top: 16px;">{{#switch:{{{1}}}
| fr = [[Category:FR]]
| fr = [[Category:FR]]
| en = [[Category:EN]]
| en = [[Category:EN]]
| es = [[Category:ES]]
| es = [[Category:ES]]
|'''INVALID_BASE_LANGUAGE'''}}{{#if:{{{fr|}}}
|'''INVALID_BASE_LANGUAGE'''}}{{#if:{{{fr|}}}
|<div style="display:inline-block; padding: 0px 4px 0px 4px; border: solid 1px lightgrey">[[Fichier:Icon-flag-fr.png|link={{{fr}}}]] [[{{{fr}}}]]</div>
|<div style="display:inline-block; padding: 0px 4px 0px 4px; border: solid 1px lightgrey">[[Fichier:Icon-flag-fr.png|link={{{fr}}}]] [[{{{fr}}}]]</div>&nbsp;
|}}{{#if:{{{en|}}}
|}}{{#if:{{{en|}}}
|<div style="display:inline-block; padding: 0px 4px 0px 4px; border: solid 1px lightgrey">[[Fichier:Icon-flag-en.png|link={{{en}}}]] [[{{{en}}}]]</div>
|<div style="display:inline-block; padding: 0px 4px 0px 4px; border: solid 1px lightgrey">[[Fichier:Icon-flag-en.png|link={{{en}}}]] [[{{{en}}}]]</div>&nbsp;
|}}{{#if:{{{es|}}}
|}}{{#if:{{{es|}}}
|<div style="display:inline-block; padding: 0px 4px 0px 4px; border: solid 1px lightgrey">[[Fichier:Icons-flag-es.png|link={{{es}}}]] [[{{{es}}}]]</div>
|<div style="display:inline-block; padding: 0px 4px 0px 4px; border: solid 1px lightgrey">[[Fichier:Icons-flag-es.png|link={{{es}}}]] [[{{{es}}}]]</div>&nbsp;
|}}</div></includeonly></onlyinclude>
|}}</div></includeonly></onlyinclude>



Latest revision as of 12:55, 6 April 2026


Ce modèle permet de gérer l'internationalisation (i18n) des pages interwiki. Il ajoute une catégorie à la page avec la langue, et rajoute les liens vers la même page dans les autres langues. Il n'est pas nécessaire d'ajouter le nom de la page dans sa langue actuelle.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Langue1

Code ISO de la langue de la page actuelle

Suggested values
fr en es
Stringrequired
Page en françaisfr

Nom de cette page en français

Stringoptional
Page in englishen

Name of this page in english

Stringoptional
Página en españoles

Nombre de esta página en español

Stringoptional

Exemples

{{I18n|fr|en=Old T-Shirt|es=Camiseta vieja}}

  


{{I18n|en|fr=Vieux T-shirt|es=Camiseta vieja}}

  


{{I18n|es|en=Old T-Shirt|fr=Vieux T-shirt}}

  


{{I18n|de}}

INVALID_BASE_LANGUAGE

=Il faut ajouter la nouvelle langue dans ce modèle.