I need to translate my site to Tamil. This is my code:
$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");
And I have create .mo
and .po
files for the word Username
and which is in the /var/www/tamil/Locale/ta_IN/LC_MESSAGES/ta_IN.mo
and ta_IN.po
, but it is not translating my site.
I have these questions and their accepted answers, but the solutions did not work for me: