Template:Unitdesc: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
Line 8: Line 8:
A template for centralized markup management of a unit description section.
A template for centralized markup management of a unit description section.
===Example===
===Example===
<nowiki>{{Unitdesc
|id=phoenix
|lang=fr
}}</nowiki>
{{Unitdesc
{{Unitdesc
|id=phoenix
|id=phoenix
|lang=en
|lang=fr
}}
}}
===Use===
===Use===
====Automatic====
Based on the page title, the template automatically selects the language and chooses a description from the database.
<nowiki>{{Unitdesc}}</nowiki>
====Semi-automatic====
You must specify the language (language code) and the unit name (in-game name in English).
You must specify the language (language code) and the unit name (in-game name in English).
  <nowiki>{</nowiki>{Unitdesc
  <nowiki>{</nowiki>{Unitdesc
  |unit=''Name''
  |unit=''Name''
  |lang=''Code''
  |lang=''Code''
}}
OR
<nowiki>{</nowiki>{Unitdesc
|''Name''
|''Code''
  }}
  }}
{{LanguageCodesNote}}
{{LanguageCodesNote}}
====Non-automatic====
Allows you to enter the description text completely manually.
<nowiki>{{Unitdesc
|description=
}}</nowiki>
__NOTOC__
__NOTOC__
[[Category:Formatting templates]]
[[Category:Formatting templates]]

Revision as of 15:34, 25 June 2026

A template for centralized markup management of a unit description section.

Example

{{Unitdesc
|id=phoenix
|lang=fr
}}
Les phénix ne sont pas originaires de Jadame, mais des voyageurs qui y sont entrés de leur plein gré. Nichés au cœur de la forêt, ils font preuve d’une intelligence remarquable.

On dit qu’une simple étincelle suffit à les ramener à la vie.

Use

You must specify the language (language code) and the unit name (in-game name in English).

{{Unitdesc
|unit=Name
|lang=Code
}}

The language codes are:

  • "en" — for pages in English (pages that are not language subpages)
  • "de" — for /de subpages (German)
  • "es" — for /es subpages (Spanish)
  • "pt-br" — for /pt-br subpages (Portuguese)
  • "fr" — for /fr subpages (French)
  • "it" — for /it subpages (Italian)
  • "ja" — for /ja subpages (Japanese)
  • "pl" — for /pl subpages (Polish)
  • "ru" — for /ru subpages (Russian)
  • "zh-hans" — for /zh-hans subpages (Chinese, Simplified)
  • "zh-hant" — for /zh-hant subpages (Chinese, Traditional)