【发布时间】:2010-11-23 20:45:19
【问题描述】:
gettext 如何翻译字符串变量?它似乎不想这样做..假设我有 $sentence = "Hello World";然后我想回显 ($sentence); ...我该怎么做才能翻译 Poedit 中 $sentence 中的内容?我可以使用 -> echo sprintf(("%s test"), $sentence) 这将打印“Hello World test”在浏览器中,但它会在 Poedit 中显示为“%s test”,我不会在 Poedit 中获得 Hello World 的翻译版本。那么如何在 Poedit 中使用字符串变量呢?谢谢!
【问题讨论】:
标签: php string variables gettext poedit