Change the language entries!
Now in the controller you need to assign all the entries for the language like ...
$this->data['column_product'] = $this->language->get('column_product');
$this->data['column_model'] = $this->language->get('column_model');
$this->data['column_quantity'] = $this->language->get('column_quantity');
$this->data['column_price'] = $this->language->get('column_price');
$this->data['column_total'] = $this->language->get('column_total');
And in the view call this
<td><?php echo $text_total_sale_year; ?></td>
<td align="right"><?php echo $total_sale_year; ?></td>
</tr>
<tr>
<td><?php echo $text_total_order; ?></td>
<td align="right"><?php echo $total_order; ?></td>
This is very dirty. The language never need to be proccess. Only is needed to be loaded the languages files.
I think that is better to assign a variable language in the "function render" in controller and call the method get of the object language or create a "magic method __get" to call the dinamic method get when you call a propertie that doesn't exists,
FOR EXAMPLE :
The Controller-->
protected function render() {
foreach ($this->children as $child) {
$this->data[basename($child)] = $this->getChild($child);
}
if (file_exists(DIR_TEMPLATE . $this->template)) {
extract($this->data);
//I've put _language becouse I want to show that this is a "special variable" and I don't want to confuse with a data variable.
$_language = $this->language;
//You could put a short variable to be easier to call this
$_l = $this->language;
....
The View :
<td width="80%"><?php
echo $_language->get('text_total_sale'); ?></td>
<td align="right"><?php echo $total_sale; ?></td>
<!-- short -->
<td width="80%"><?php
echo $_l->get('text_total_sale'); ?></td>
<td align="right"><?php echo $total_sale; ?></td>
OR
in class language
function __get($name) {
return $this->get($name);
}
and in view
view :
<td width="80%"><?php echo $_language->text_total_sale; ?></td>
<td align="right"><?php echo $total_sale; ?></td>
<!-- short -->
<td width="80%"><?php echo $_l->text_total_sale; ?></td>
<td align="right"><?php echo $total_sale; ?></td>
If you need more help please send me a email :
kalan2001@hotmail.com.
Thanks!
And sorry for me english