Author Topic: $VM_LANG->_($var) not working  (Read 1426 times)

jeorcal

  • Jr. Member
  • **
  • Posts: 181
$VM_LANG->_($var) not working
« on: July 24, 2010, 10:11:17 am »


why this code is not working ? and how can I do that it works ? I need  a variable instead of $VM_LANG->_('PHPSHOP_ACC_CUSTOMER_ACCOUNT')

$var = 'PHPSHOP_ACC_CUSTOMER_ACCOUNT';
$VM_LANG->_($var)


many thanks

jeorcal

  • Jr. Member
  • **
  • Posts: 181
Re: $VM_LANG->_($var) not working
« Reply #1 on: September 13, 2010, 17:11:41 pm »
no idea
instead of
switch ($db->f("order_status")) {
         case 'C':
             $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_C',false);
             break;
         case 'X':
             $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_X',false);
             break;
         case 'R':
             $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_R',false);
             break;
         case 'S':
             $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_S',false);
             break;
         case 'U':
             $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_U',false);
             break;
         case 'P':
             $message .= $VM_LANG->_('PHPSHOP_ORDER_STATUS_CHANGE_P',false);
             break;

      }

I could use

$var = 'PHPSHOP_ORDER_STATUS_CHANGE_' . $db->f("order_status");
 $message .= $VM_LANG->_($var,false);