PHP and Gettext not work on my server!
Posted
by NeoNmaN
on Stack Overflow
See other posts from Stack Overflow
or by NeoNmaN
Published on 2010-05-26T16:49:57Z
Indexed on
2010/05/26
16:51 UTC
Read the original article
Hit count: 297
i have this site ( http://rssbot.dk/en/ ) i try to get gettext to work so my english, sweiden and norway site can comming up.
Bot i can't get it to work, what have i doe wrong?
this is my config code
// define constants ( defualt - danish )
$lang = 'da_DA';
$lang_short = '';
$lang_prefix = 'da';
if ( isset( $_GET['lang'] ) )
{
switch( $_GET['lang'] )
{
case 'en':
$lang = 'en_EN';
$lang_short = 'en/';
$lang_prefix = 'en';
break;
case 'se':
$lang = 'se_SE';
$lang_short = 'se/';
$lang_prefix = 'se';
break;
case 'no':
$lang = 'no_NO';
$lang_short = 'no/';
$lang_prefix = 'no';
break;
}
}
define( 'LANG', $lang_short );
define( 'LANG_PREFIX', $lang_prefix );
putenv("LC_ALL=". $lang );
bindtextdomain('messages', ROOT .'lang/');
and my path is /var/www/rssbot.dk/lang/ folder. shut i make chmod right or?
i hob to can be helpet
© Stack Overflow or respective owner