Template:Langbar: Difference between revisions
Jump to navigation
Jump to search
Add language switch |
Language switch |
||
| Line 1: | Line 1: | ||
<includeonly><div class="langbar" style="float:right;clear:right;margin:0 0 10px 15px;padding:4px 10px;border:1px solid #c8ccd1;border-radius:3px;background:#f8f9fa;white-space:nowrap;">[[ | <includeonly><div class="langbar" style="float:right;clear:right;margin:0 0 10px 15px;padding:4px 10px;border:1px solid #c8ccd1;border-radius:3px;background:#f8f9fa;white-space:nowrap;">[[{{{en}}}|<span title="English" style="display:inline-block;width:40px;height:20px;border:1px solid #888;vertical-align:middle;background:linear-gradient(to bottom,transparent 40%,#C8102E 40%,#C8102E 60%,transparent 60%),linear-gradient(to right,transparent 45%,#C8102E 45%,#C8102E 55%,transparent 55%),linear-gradient(to bottom,transparent 33.333%,#fff 33.333%,#fff 66.667%,transparent 66.667%),linear-gradient(to right,transparent 41.667%,#fff 41.667%,#fff 58.333%,transparent 58.333%),linear-gradient(26.565deg,transparent 50%,#C8102E 50%,#C8102E 57.454%,transparent 57.454%) 100% 100% / 50% 50% no-repeat,linear-gradient(153.435deg,transparent 50%,#C8102E 50%,#C8102E 57.454%,transparent 57.454%) 0 100% / 50% 50% no-repeat,linear-gradient(26.565deg,transparent 42.546%,#C8102E 42.546%,#C8102E 50%,transparent 50%) 0 0 / 50% 50% no-repeat,linear-gradient(153.435deg,transparent 42.546%,#C8102E 42.546%,#C8102E 50%,transparent 50%) 100% 0 / 50% 50% no-repeat,linear-gradient(26.565deg,transparent 44.41%,#fff 44.41%,#fff 55.59%,transparent 55.59%),linear-gradient(153.435deg,transparent 44.41%,#fff 44.41%,#fff 55.59%,transparent 55.59%),#012169"></span>]] [[{{{fr}}}|<span title="Français" style="display:inline-block;width:30px;height:20px;border:1px solid #888;vertical-align:middle;background:linear-gradient(to right,#0055A4 33.34%,#fff 33.34%,#fff 66.67%,#EF4135 66.67%)"></span>]]</div></includeonly><noinclude> | ||
'''Language switch.''' Shows an English flag and a French flag at the top right of a page. Each flag links to the same article in that language. | '''Language switch.''' Shows an English flag and a French flag at the top right of a page. Each flag links to the same article in that language. The flags are drawn with CSS, so no image needs to be uploaded. | ||
'''Usage''' (put it at the top of both language versions of a page, with the English title first): | '''Usage''' (put it at the top of both language versions of a page, with the English title first): | ||
| Line 11: | Line 11: | ||
<br clear="all" /> | <br clear="all" /> | ||
Do not put this template on a redirect page. It is generated by ''tools/make_langbar_template.py''. | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 22:31, 18 September 2026
Language switch. Shows an English flag and a French flag at the top right of a page. Each flag links to the same article in that language. The flags are drawn with CSS, so no image needs to be uploaded.
Usage (put it at the top of both language versions of a page, with the English title first):
{{Langbar|en=Accounting|fr=Accounting/fr}}
Result:
Do not put this template on a redirect page. It is generated by tools/make_langbar_template.py.