I am trying to use Apache on Ubuntu 14.04 and it works fine:
<?php
var_dump(setlocale(LC_ALL, 'pl_PL.UTF8'));
echo file_get_contents('/var/www/app/backend/gettext/locale/pl_PL/LC_MESSAGES/app.mo');
var_dump(bindtextdomain("app", "/var/www/app/backend/gettext/locale"));
var_dump(bind_textdomain_codeset("app", 'UTF-8'));
var_dump(textdomain("app"));
echo _('I want translate this!');
echo _('This to!');
But when I try this on PHP built on a web server, I only get the English version and that is the only difference between the two. Is gettext php built into the web server supported? Any way around this?
Thanks for the help!
source
share