Reputation: 93
I'am trying to run gettext on a domain but there is an error anywhere...
on my local xampp installation works all fine but on the server are some bugs and I don't know how to debug gettext
this is my setup... the var is given in the url... e.g. es_ES
if (isset($_GET['lang'])) $lang = $_GET['lang'];
putenv("LC_ALL=$lang");
setlocale(LC_ALL, $lang);
bindtextdomain("messages", "./locale");
bind_textdomain_codeset('messages', 'UTF-8');
textdomain("messages");
and this is the path to my translation files /httpdocs/locale/es_ES/LC_MESSAGES
Has anybody an idea?
Kind regards,
Bob
Upvotes: 0
Views: 192
Reputation: 53462
via ssh shows only C & POSIX after entering "locale -a".
You don't have locales installed on the server then. Your system will only support the locales installed on your OS, in the exact format given by your OS like explained in manual comments.
Someone has to install the locales there. If you're not the admin, the server admin needs to do it.
Upvotes: 1