Indeed we can not chain the calls like that because the first set_lang returns None and so the other will not be called.
Instead I think we must add a line for each call:
Indeed I think the right thing to do is to use the new 'replace' directive from relatorio 0.6.2. Like that, the empty line will be removed.
So the statement will be:
replace text:p="set_lang(…) and record.set_lang(…) and ''"
The calls to set_lang has been on a single line in most report template (I think it is by issue6011). This makes them not being called because the last statement erase of the line erases the all lines.
relatorio control statements should always be put on a single line.
I propose to fix it after issue6545 to get a reviewable patch.