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");
而且我已創建.mo
和.po
文件字Username
並且這是在/var/www/tamil/Locale/ta_IN/LC_MESSAGES/ta_IN.mo
和ta_IN.po
,但它不翻譯我的網站。
我有這些問題和他們接受的答案,但解決方案並沒有爲我工作:如果您正在測試的gettext上
- PHP - GetText not working
- How to debug gettext not working in PHP?
- Gettext not working, no error messages, using php 5.3