0
我想创建一个新的多语言网站。我用poEDit
和getText()
函数。我不知道我用这段代码遗漏了什么:多语言网站poEDit和getText()
<?php
if (!function_exists("gettext"))
{
echo "gettext is not installed\n";
} else {
echo "gettext is supported\n";
}
$language = 'ar_JO';
putenv("LANG=$language");
setlocale(LC_ALL, $language);
$domain = 'ar_JO';
bindtextdomain($domain, "./locale");
bind_textdomain_codeset($domain, 'UTF-8');
textdomain($domain);
echo _("HELLO_WORLD");
echo _("hi this to be translated ");
我有这个 “C:\ WAMP \ WWW \ loginSystemOOP /区域/ ar_JO/LC_MESSAGES/messages_ar_JO.mo” 我的文件结构是'C:\ wamp \ www \ loginSystemOOP/locale/ar_JO/LC_MESSAGES /' –