[eluser]Mahn[/eluser]
Greetings,
Without editing anything in the system folder, I'm trying to create a helper that simplifies the core language_helper. I want to make a similar function, but where it echos the value, instead of returning it.
So instead of: echo lang('general_welcome_message'); I could write phrase('general_welcome_message'); to make everything a little easier for the designer.
Here's the code I've got so far.
Code:
if ( ! function_exists('phrase'))
{
function phrase($phrase)
{
$CI =& get_instance();
$phrase = $CI->lang->line($phrase);
echo $phrase;
}
}
This obviously doesn't work, even though the code is copied for the core helper, because this is located in the application folder.
So my question is, how do I make this work?