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!
In CI Forum, nlogachev suggest better solution.
It can switch variables order.
use case~
Your best bet is probably to put a placeholder in there, then swap it out in your controller.
Lang file:
In controller: