Actually this should be `if ctx['DIR'] == 'rtl':`