»
S
I
D
E
B
A
R
«
Codeigniter: Variables/Config Items within Language Files
November 11th, 2009 by wood

I have a language file with a long list of strings for my view files. My question is how to pass a variable or a config item to a language file?

<?php $lang['error_activation_key_expired'] = 'The activation key you have attempted using has expired. Please request a new Activation Key <a href="'.$this->config->item('base_url').'member/request_activation" title="Request a New Activation Key">here</a>.';

I would could settle for

<?php $lang['error_activation_key_expired'] = 'The activation key you have attempted using has expired. Please request a new Activation Key <a href="'.$base_url.'member/request_activation" title="Request a New Activation Key">here</a>.';

and pass the base_url to it somehow. I just don't know how.

Thanks!


One Response  
  • sandeep writes:
    January 6th, 2010 at 1:49 am

    Hi i faced the same prob .
    As a temperary solution i copied the language file say en_us.php into controller and used include() function
    include “en_us.php “


Leave a Reply

»  Substance: PHP Frameworks   »  SiteMap