• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Correct Way Of Getting Language Text

#1
[eluser]razerone[/eluser]
Hello. I am just stuck a little bit have be trying to under stand the language setup.

I am trying to see if this is correct way?

In my Language / English folder I have folder called common in that is file called header.php

I am not to sure if this is the correct way of putting the data on there.

Code:
<?php
// Text
$_['text_home']           = 'Home';
$_['text_search']         = 'Search';
?>

And on the controller folder common / header.php

Code:
$this->language->load('common/header');
$this->data['text_home'] = $this->language->get('text_home');
$this->data['text_search'] = $this->language->get('text_search');
$this->data['home'] = $this->url->link('common/home');

And on the views common / header.php

example:
Code:
<div class="links"><a href="&lt;?php echo $home; ?&gt;">&lt;?php echo $text_home; ?&gt;</a></div>

What is wrong not sure I tried it.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.