是否有可能在PHP中翻译“试图获取非对象属性”错误?

I'm developing CRM application using PHP code, i need to translate the error 'trying to get property of non object' to french translate.

I am using YII framework.

Note: try/catch block does not catch this error.

Can anybody provide me an idea to translate this error ?

You can use a Try-Catch Statement for this. Just catch the error and throw your own msg.

try {
   // YOUR CODE TO GET PROPERTY FROM OBJECT WHICH DOES NOT EXIST
} catch (Exception $e) {
  echo "On ne voit bien qu’avec le cœur. L’essentiel est invisible pour les yeux.";
 //NEXT LINE PRINTS THE REAL ERROR MSG
 //echo 'Exception : ',  $e->getMessage(), "<br>";
}