Welcome Guest, Not a member yet? Register   Sign In
Language Helper Question
#1

[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';
?&gt;

$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="&lt;?php echo $home; ?&gt;">&lt;?php echo $text_home; ?&gt;</a><a href="&lt;?php echo $wishlist; ?&gt;" id="wishlist-total">&lt;?php echo $text_wishlist; ?&gt;</a><a href="&lt;?php echo $account; ?&gt;">&lt;?php echo $text_account; ?&gt;</a><a href="&lt;?php echo $shopping_cart; ?&gt;">&lt;?php echo $text_shopping_cart; ?&gt;</a><a href="&lt;?php echo $checkout; ?&gt;">&lt;?php echo $text_checkout; ?&gt;</a></div>




Theme © iAndrew 2016 - Forum software by © MyBB