[eluser]razerone[/eluser]
What is the best way to set up the Language Helper & Classes.
I would like to set up some thing like how open cart uses there language files. Is it possible to set up way like this. or some thing close I have been trying to understand Language Helper & Classes
header.language file
Code:
<?php
// Text
$_['text_home'] = 'Home';
$_['text_wishlist'] = 'Wish List (%s)';
$_['text_shopping_cart'] = 'Shopping Cart';
$_['text_search'] = 'Search';
$_['text_welcome'] = 'Welcome visitor you can <a href="%s">login</a> or <a href="%s">create an account</a>.';
$_['text_logged'] = 'You are logged in as <a href="%s">%s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';
$_['text_account'] = 'My Account';
$_['text_checkout'] = 'Checkout';
?>
$this->data['text_home'] = $this->language->get('text_home');
$this->data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), (isset($this->session->data['wishlist']) ? count($this->session->data['wishlist']) : 0));
$this->data['text_shopping_cart'] = $this->language->get('text_shopping_cart');
$this->data['text_search'] = $this->language->get('text_search');
$this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL'));
$this->data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', 'SSL'), $this->customer->getFirstName(), $this->url->link('account/logout', '', 'SSL'));
$this->data['text_account'] = $this->language->get('text_account');
$this->data['text_checkout'] = $this->language->get('text_checkout');
$this->data['home'] = $this->url->link('common/home');
$this->data['wishlist'] = $this->url->link('account/wishlist', '', 'SSL');
$this->data['logged'] = $this->customer->isLogged();
$this->data['account'] = $this->url->link('account/account', '', 'SSL');
$this->data['shopping_cart'] = $this->url->link('checkout/cart');
$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');
<div class="links"><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a><a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a><a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a><a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>