Jump to content

Zend undefined function bindtextdomain()


Recommended Posts

Hi all.

 

 

 

HAPPY NEW YEAR.

 

 

 

I'm working on my problem no one month an can't find a solution.

 

I have installd on CENT os ZEND PHP and try to use gettext.

 

Withe windows everything works fine but Linux is my webserver.

 

 

 

In error.log i get only

 

Sun Dec 30 20:00:26 2007] [error] [client 84.75.114.127] PHP Fatal error:

 

Call to undefined function bindtextdomain() /usr/local/Zend/apache2/htdocs/index_gettext.php

 

 

 

This is my script.

 

 

 

<?php

 

$lang = 'de' ;

 

// Set language to Lang

 

putenv("LANG=$lang");

 

// teilt gettext die Sprache mit

 

setlocale(LC_ALL,  $lang);

 

 

 

 

 

$locale = $lang; // setzt die Sprache auf Deutsch

 

$domain = 'A-T-C'; // setzt die Dom?ne

 

$encoding = 'ISO-8859-15'; // setzt die Zeichenkodierung

 

 

 

// teilt gettext die Sprache mit

 

setlocale(LC_MESSAGES, $locale);

 

 

 

// teilt gettext mit, wo es die ?bersetzungen suchen soll

 

bindtextdomain($domain , "./");

 

// teilt gettext die zu verwendene Zeichenkodierung mit

 

bind_textdomain_codeset($domain, $encoding);

 

 

 

// weist gettext an, die definierte Dom?ne zu verwenden

 

textdomain($domain);

 

 

 

// gettext erwartet die ?bersetzung nun in ./de/LC_MESSAGES/A-T-C.mo

 

//echo " $locale ,$domain , $encoding <br>";

 

// die ?bersetzung ausgeben

 

echo gettext('Hello World');

 

echo '<br />';

 

 

 

// die ?bersetzung ausgeben; Kurzform

 

echo _('trans_reser.php_text1');

 

?>

 

 

 

 

 

Someone can help ?

 

 

 

Thanks a lot Gert

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.