Welcome Guest, Not a member yet? Register   Sign In
codeigniter gettext poedit php
#3

[eluser]T-productions[/eluser]
HI everyone,

I've tried your solution on Code Igniter 2.0.2 but it doesn't work at all.
In fact when I echo a string with "_" like :

Code:
echo _("My string");

I work in a local environment with Wamp Server and my firefox says :

Quote:The connection was reset

However I've put an autoload for this helper and copy your function in a helper like this :

Code:
<?php
set_translation_language('fr_FR');
function set_translation_language($language){
    $lang_path = FCPATH.APPPATH.'language/locale';
    putenv('LANG='.$language.'.UTF-8');
    setlocale(LC_ALL, $language.'.UTF-8');
    bindtextdomain('messages', $lang_path);
    textdomain('messages');
}
?>

Any ideas ? Thanks in advance for your help.

Cyril


Messages In This Thread
codeigniter gettext poedit php - by El Forum - 06-14-2011, 12:20 PM
codeigniter gettext poedit php - by El Forum - 06-15-2011, 07:48 AM
codeigniter gettext poedit php - by El Forum - 07-17-2011, 11:53 AM
codeigniter gettext poedit php - by El Forum - 07-17-2011, 03:11 PM
codeigniter gettext poedit php - by El Forum - 07-18-2011, 10:26 AM
codeigniter gettext poedit php - by El Forum - 07-18-2011, 12:56 PM
codeigniter gettext poedit php - by El Forum - 07-18-2011, 01:23 PM
codeigniter gettext poedit php - by El Forum - 07-18-2011, 01:31 PM
codeigniter gettext poedit php - by El Forum - 07-22-2012, 08:50 AM
codeigniter gettext poedit php - by El Forum - 08-11-2013, 12:48 PM
codeigniter gettext poedit php - by El Forum - 08-11-2013, 12:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB