You should use text tags.
Copying example text from above:
Text tags to change what text is displayed depending on the pronouns selected
e.g., This is {0}Mr{/0}{1}Ms{/1}{2}Mx{/2} Parrot.
pronountools.rpy also suggests a different method if you don't plan on localising.