Welcome Guest, Not a member yet? Register   Sign In
Using config item in language file
#1

[eluser]bhumes[/eluser]
Is it possible to use a config item in a language file?

I have this in my application/config/config.php file:
Code:
$config['settings.tollfree']  = '00 800 4263 7393';

and in my application/languages/english/all_lang.php file:
Code:
$lang['call_us'] = "Please call us at ".$this->config->item('settings.tollfree').".";

When I run it, I get this error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI_Lang::$config
Filename: english/all_lang.php
Line Number: 204 <-- this is the above line #

I am assuming this has to do with the order things are loaded in CI. Is there anything I can do about this? Any advice?

Thanks a million!


Messages In This Thread
Using config item in language file - by El Forum - 06-03-2011, 12:37 PM
Using config item in language file - by El Forum - 06-03-2011, 06:36 PM
Using config item in language file - by El Forum - 06-03-2011, 08:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB