gettext not working on php nginx


I have the phalcon incubator in use with gettext as translation adapter. On unix/linux apache php 5.4 it works fine.

I have a ubuntu server running php 5.5+ with nginx and the translation is not working. (see The message files are still available and gettext is installed.

My question: Does anybody else having a similar issue with this, is there a solution for this in combination with falcon incubator?

edited Mar '14

HI mywebcontent Note path in bindtextdomain

$locality = $this->session->get('language').'.UTF-8';
        if (defined('LC_MESSAGES')) {
            setlocale(LC_ALL, $locality); // Linux
        } else {
            putenv("LC_ALL={$locality}"); // windows
        //ho $dir = $_SERVER['DOCUMENT_ROOT'].'/app/lang';


         * Tell the application to use this text domain, or

Test page and source

Thank you, Assuming that other platforms could have similar issues, I also developed a DB version, but your suggestion works for me.