Thanks for your email.

I had some error during the steps. After some fight...I did it!

The final files look like this

 

My “class.translator.php”:

----------------------------

<?php

 

class Translator {

  function translateArray($items) {

     $res = array();

     foreach ($items as $key => $item) {

        $res[$key] = Translator::translateString($item);

     }

     return $res;

  }

 

  function translateString($string) {

 

   $t = $string;

   switch ($string) {

      case 'Title': $t = 'Titulo'; break;

      case 'English Phrase': $t = 'Non English Phrase'; break;

      default: break;

   }

   return $t;

}

}

?>

----------------------------

Changed your

include_once(APP_INC_PATH,'class.translator.php');

 

to

include_once(APP_INC_PATH . "class.translator.php");

 

and placed not on the top but in 3º.

 

include_once("config.inc.php");

include_once(APP_INC_PATH . "db_access.php");

include_once(APP_INC_PATH . "class.translator.php");

 

Changed the line in list.php that has this
  $tpl->assign('order_by_list', $order_by_list);

 to :
    $tpl->assign('order_by_list', Translator::translateArray($order_by_list));

 

Now, it works fine.

Thanks for your support and help!

 

 

António