Predefinição:GameText
This template is used to retrieve in-game text, based on the game text database which is taken from the source code.
Note: this template is relatively slow, so please use other database templates first, if possible.
Usage
{{gameText|<index key>|lang=<lang>|nl2br=no|x_<name>=<value>...|y_<name>=<value>...}}
- Unnamed Parameter 1
Index key for text. Same as in-game language JSON files. See examples below.
- lang (optional)
Language code. Currently we have 9 languages (as in-game): en/es/it/de/fr/zh/pl/pt/ru. All other lang codes will use en database.
- all
x_<name>
andy_<name>
parameters
Replacement for placeholder. There are 2 types of placeholder in the game text: {xxx}
and <yyy>
, indexed by x_...
and y_...
, respectively. See examples below.
- nl2br
By default, link breaks (\n) in gameText will be replaced with <br/>. If nl2br
is set, it will output raw text.
- json
By default, gameText will query text from cargo database. If json
is set, it will query from original game language files. This is a bit stable and accurate and supports returning all contents of a string array, at the cost of taking up much more resources.
Examples
Code | Result |
---|---|
{{gameText|ItemName.IronPickaxe}} |
Picareta de Ferro FAIL! (expected: Iron Pickaxe) |
{{gameText|LegacyMultiplayer.21}} |
/jogadores FAIL! (expected: /players) |
{{gameText|ItemTooltip.BeeKeeper}}
|
Invoca abelhas assassinas depois de atacar seu inimigo Pequena chance de causar confusão FAIL! (expected: Summons killer bees after striking your foe Small chance to cause confusion) |
{{gameText|ItemTooltip.BeeKeeper|nl2br=no}}
|
Invoca abelhas assassinas depois de atacar seu inimigo Pequena chance de causar confusão FAIL! (expected: Summons killer bees after striking your foe Small chance to cause confusion) |
{{gameText|UI.WorldSizeFormat}} |
Mundo {0} FAIL! (expected: {0} World) |
{{gameText|UI.WorldSizeFormat|x_0=Large}} |
Mundo Large FAIL! (expected: Large World) |
{{gameText|LegacyDialog.19}} |
{PlayerName}, não é isso? Ouvi falar bem de você, colega! FAIL! (expected: {PlayerName} is it? I've heard good things, friend!) |
{{gameText|LegacyDialog.19|x_PlayerName=myName}} |
myName, não é isso? Ouvi falar bem de você, colega! FAIL! (expected: myName is it? I've heard good things, friend!) |
{{gameText|Misc.ResolutionChanged}} |
Resolução alterada para: {0}x{1}. FAIL! (expected: Resolution changed to: {0}x{1}.) |
{{gameText|Misc.ResolutionChanged|x_1=768}} |
Resolução alterada para: {0}x768. FAIL! (expected: Resolution changed to: {0}x768.) |
{{gameText|Misc.ResolutionChanged|x_0=1024|x_1=768}} |
Resolução alterada para: 1024x768. FAIL! (expected: Resolution changed to: 1024x768.) |
{{gameText|ItemTooltip.GoodieBag}} |
<right> para abrir FAIL! (expected: <right> to open) |
{{gameText|ItemTooltip.GoodieBag|y_right=Right click}} |
Right click para abrir FAIL! (expected: Right click to open) |
{{gameText|ItemTooltip.GoodieBag|y_right={{key|open}}}} |
⚷ Abrir / Ativar para abrir FAIL! (expected: ⚷ Abrir / Ativar to open) |
{{gameText|ItemName.IronPickaxe|lang=es}} |
Iron Pickaxe FAIL! (expected: Pico de hierro) |
{{gameText|ItemName.IronPickaxe|lang=it}} |
Iron Pickaxe FAIL! (expected: Piccone di ferro) |
{{gameText|ItemName.IronPickaxe|lang=de}} |
Iron Pickaxe FAIL! (expected: Eisenspitzhacke) |