在Windows上使用WAMPserver(Apache,MySQL和PHP)我有以下幾點:如何生成.po文件?
//test.php
if (!defined('LC_MESSAGES'))
define('LC_MESSAGES', 6);
$lang = "sv";
putenv("LANG=$lang");
setlocale(LC_ALL, $lang);
$domain = "messages";
bindtextdomain($domain, "./locale");
textdomain($domain);
echo _("This is a string");
它正常工作,即輸出「這是一個字符串」,這意味着我有gettext
正確的設置了。
但是如何在世界上創建一個.po
文件?
我下載了Poedit,但我無法看到如何使這個軟件發生這種情況。
任何幫助,非常感謝!
我發現本教程很有幫助[>> Gettext&PoEdit >>](https://www.youtube.com/watch?v = -RuqVDdC1cI) – 2013-11-30 05:51:20