Template:I18n: Difference between revisions
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> | ||
|}}{{#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> | ||
|}}{{#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> | ||
|}}</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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Langue | 1 | Code ISO de la langue de la page actuelle
| String | required |
| Page en français | fr | Nom de cette page en français | String | optional |
| Page in english | en | Name of this page in english | String | optional |
| Página en español | es | Nombre de esta página en español | String | optional |
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.