Jump to content

Module:Msg/keywords/doc

From PokeHero Official Wiki
Revision as of 14:31, 5 September 2025 by Admin (talk | contribs) (Module:Msg/keywords)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Msg/keywords

Module:Msg/keywords

This submodule contains translations for diverse keywords used in the PokeHero wiki.

Structure

The table maps message keys to translations for each language. Example:

return {
    ["pokehero-keywords-attacking_type"]    = { en = "Attacking Type", fr = "Type Offensif" },
    ["pokehero-keywords-defending_type"]    = { en = "Defending Type", fr = "Type Défensif" }
}
  • Keys should follow the pattern pokehero-keywords-<name> for consistency.
  • Languages use their ISO codes (en, fr, etc.).
  • Add new keywords by adding new entries to this table.

Usage

Access the keywords table via Module:Msg:

{{#invoke:Msg|msg|keywords|attacking_type}}

This automatically returns the correct translation for the page language or falls back to English if necessary.

Notes

  • This table is only loaded when requested to minimize memory usage.
  • Missing keys or translations are handled gracefully by Module:Msg.