我目前正在将 smarty 与 zend 框架一起使用,并且我已经设置 smarty 以通过以下方式使用 gettext:
{gettext text="resource-identifier"}
这可以正常工作,但是在尝试将其与 smarty 默认变量处理程序一起使用时遇到了问题。我想做这个:
{$somevar|default:gettext text="resource-identifier"}
但这只会打印“gettext”。关于如何做到这一点的任何建议。甚至可能吗?