Module:Msg/keywords/doc: Difference between revisions

Created page with "== 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: <pre> return { ["pokehero-keywords-attacking_type"] = { en = "Attacking Type", fr = "Type Offensif" }, ["pokehero-keywords-defending_type"] = { en = "Defending Type", fr = "Type Défensif" } } </pre> * Keys should follow the pattern `pokehero-keywords-<name..."
 
 
Line 12: Line 12:
</pre>
</pre>


* Keys should follow the pattern `pokehero-keywords-<name>` for consistency.
* Keys should follow the pattern <code>pokehero-keywords-<name></code> for consistency.
* Languages use their ISO codes (en, fr, etc.).
* Languages use their ISO codes (en, fr, etc.).
* Add new keywords by adding new entries to this table.
* Add new keywords by adding new entries to this table.


=== Usage ===
=== Usage ===
Access the keywords table via `Module:Msg`:
Access the keywords table via <code>Module:Msg</code>:


<pre>
<pre>
Line 27: Line 27:
=== Notes ===
=== Notes ===
* This table is only loaded when requested to minimize memory usage.
* This table is only loaded when requested to minimize memory usage.
* Missing keys or translations are handled gracefully by `Module:Msg`.
* Missing keys or translations are handled gracefully by <code>Module:Msg</code>.