0
私のサイトをタミル語に翻訳する必要があります。これは私のコードです:PHP gettextの翻訳がうまくいきません
$locale = "ta_IN";
putenv("LANG=".$locale);
setlocale(LC_ALL, $locale);
$domain = "ta_IN";
echo bindtextdomain($domain, "Locale");
bind_textdomain_codeset($domain, 'UTF-8');
textdomain($domain);
echo _("Username");
そして、私は言葉Username
と/var/www/tamil/Locale/ta_IN/LC_MESSAGES/ta_IN.mo
とta_IN.po
であるが、それは私のサイトを翻訳されていないため.mo
と.po
ファイルを作成しています。
私はこれらの質問とその受け入れられた答えを持っていますが、解決策は、私のために動作しませんでした:
- PHP - GetText not working
- How to debug gettext not working in PHP?
- Gettext not working, no error messages, using php 5.3