gettext in php (with poEdit), translating a variable -
i have work on website made else , have translate english (the website in french). tried using gettext , poedit have trouble variables lately... website using array error messages formular , tried :
$taberror['titre'] = _("<p>veuillez entrer un titre.</p>"); and tried this.
$error_trans = _("<p>veuillez entrer un titre.</p>"); $taberror['titre'] = $error_trans; the error returned php me :
fatal error: call undefined function _() in c:\wamp\www\dropbox \dropbox\www\alter\addannonce.php on line 62 the code of website not clean , pain edit ... there way translate string contains variable ?
did read error? tells problem right there: no such function exists. unrelated poedit or "variables". if indeed same error gettext, build of php compiled without gettext or has gettext module disabled.
there clear , detailed instructions on how ensure gettext enabled in php manual: http://php.net/manual/en/book.gettext.php
Comments
Post a Comment