1
我想要使用gettext字符串在我的网站PHP的gettext包括字符串phpcode
的gettext没有问题,检测字符串,例如
<? echo _("Donations"); ?>
或
<? echo _("Donate to this site");?>
翻译
但很明显,通常我们会用我们网站的代码这样的代码
<? echo _("$siteName was developed with one thing in mind"); ?>
当然在该网站的,如果我们把
$siteName = "My Website";
以前在$网站名称正确显示为
My Website was developed with one thing in mind
。
我的问题是,我使用poedit来提取需要翻译的代码中的所有字符串,并且它似乎poedit不会像上面描述的那样使用php代码提取所有字符串。那么我怎么才能用php代码提取poedit字符串呢?还是有其他工具我应该使用?
谢谢...从来没有想过PHP可以做到这一点..似乎更喜欢C到我笑 – imin