Code: Select all
<li><a href="http://myshop.com/my-custom-page">Custom English Button</a></li>
I want to know how to change the language on the "Custom English Button" automatically as the other pages. So when the non-English page loads to change the language of the button text too.
thanks in advance i hope this to help others
SOLUTION
THE FILES WE HAVE TO EDIT:
1. header.tpl on /catalog/view/theme/yourthemefolder/template/common
2. header.php on /catalog/language/english and /catalog/language/yourlanguage (you going to edit 2 files for 2 languages)
3. header.php on /catalog/controller/common
THE CODE WE HAVE TO WRITE:
on the 1. you just create the following:
Code: Select all
<li><a href="http://byzantiumicons.com/saints-index"><?php echo $new_linktext; ?></a></li>
on the 2. the languages files we doing the following:
Code: Select all
$_['new_linktext'] = 'Your English Text';
3. Finally here we create the following:
$this->data['new_linktext'] = $this->language->get('new_linktext');
just write it below: $this->data['text_home'] = $this->language->get('text_home');
Thats it.