Template:ModifierNameFromId

From Terraria Wiki
Jump to navigation Jump to search
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
Important.svg
CAUTION: Terraria Wiki code is complex!!!
If you want to use this code on another wiki, wiki.gg staff are not able to assist you.
Please consider picking a different wiki to adapt code from, or making your own templates!
Remember that content on a wiki is more important than fancy formatting.
Template-info.svg Documentation The documentation below is transcluded from Template:ModifierNameFromId/doc. (edit | history)

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

Usage

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

First unnamed parameter

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

lang

Language code, one of the following 11 (as in-game): de (German), en (English), es (Spanish), fr (French), it (Italian), ja (Japanese), ko (Korean), pl (Polish), pt (Portuguese), ru (Russian), zh (Chinese). If this parameter is omitted, it defaults to {{lang}}.

For other languages, force this template to return the English name (|lang=en) and translate it via {{tr}}: {{tr|{{modifierNameFromId|<ID>|lang=en}}}}. Note that this method might be inaccurate, so if possible (for the aforementioned 11 languages), use {{modifierNameFromId}} directly. This ensures that the result is exactly the same as in-game, and it is usually faster as well.

Examples

Code Result
{{modifierNameFromId|60}} Demonic
{{modifierNameFromId| 60 }} Demonic
{{modifierNameFromId|}}
{{modifierNameFromId}}
{{modifierNameFromId|60|lang=fr}} Démoniaque

See also