Template:ModifierNameFromId

来自Terraria Wiki
跳转到导航 跳转到搜索
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
Template-info.svg 文档 以下文档来自Template:ModifierNameFromId/doc。(编辑 | 历史

This template returns the name of a modifier based on its ID.

Usage

{{ modifierNameFromId | <modifier ID> (optional) | lang = <lang> (optional) }}

First unnamed parameter

ID of the modifier. If empty or invalid, will return empty string.

lang

Language code. Default is {{lang|}}. Currently we have 9 languages (as in game): en/es/it/de/fr/zh/pl/pt/ru.

Note: for those 9 languages, it is recommended to use {{modifierNameFromId|<id>|lang=<lang>}} instead of {{tr|{{modifierNameFromId|<id>|lang=en}}}} to get the name of the modifier in target language. This ensures that it is exactly the same as in the game, and is usually faster.

Examples

Code Result
{{modifierNameFromId|60}} 恶魔 FAIL! (expected: Demonic )
{{modifierNameFromId| 60 }} 恶魔 FAIL! (expected: Demonic )
{{modifierNameFromId|}}
{{modifierNameFromId|60|lang=fr}} Démoniaque

See also