
I'm looking at translations for rolltemplates, and the text on the wiki page raises a few questions. This is the entire text on the wiki page:
Roll Templates
Static HTML inside of the sheet's roll template definition can use all of the above tools, including Dynamic Keys. If it is in the sheet's rolltemplate definition, code like
{{strength-key}}
will give the translated value of whatever is the value of{{strength-key}}
. If you would like to send dynamically translated values inside of a roll function, use the tool below.Inside of a roll function, using a roll template, you can wrap any text in
^{ [key] }
to denote the text as a translation key. This text will be replaced with the translated version associated with that key. This step happens after character sheet values are swapped in, so^{ @{ability_key} }
whereability_key = STRENGTH
will be parsed as^{STRENGTH}
and will display whatever translation value you have forSTRENGTH
. This also works on the key, for the key/value pairs used in theallprops()
function.Example:
{{^{TEXT}=@{content} }}
will have the translation value forTEXT
as{{key}}
inside of theallprops()
function.
- Does this mean you can use getTranslationByKey inside a rolltemplate, or just in a sheet worker script block?
- What does this text mean? "If it is in the sheet's rolltemplate definition..."
- It syas translation keys can be used inside {{ }} but it also translation keys can be used inside ^{ }. Is there a difference between those two usages? Is ione only valid in certain situations?
- The example uses
^{ @{ability_key} }
. I was under the impression that attributes themssleves couldm't be translated. What is being said here? - Can you explain what is being said with the mention of allprops?
This is a particularly confusing section.