Hi! I have a use case here where I would like to compare two boolean variables in a localized string and display text based on the comparison output.
I am aware I can use {hasSword:You have a sword|You do not have a sword}
to choose between two pieces of text based on the boolean’s value.
But my goal is to compare two boolean variables. Like hasSword
and hasShield
. I tried it with the conditional formatter, but that only seemed to work with numbers for more advanced comparisons.
Is it possible to essentially do a hasSword && hasShield
test in a localized string using the conditional formatter (or any existing formatters)? Or would I have to write my own custom boolean comparison formatter?
Thanks!