CodeIgniter Forums
HTML on language lines - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: HTML on language lines (/showthread.php?tid=78065)

HTML on language lines - lucky - 11-25-2020

Is there any way to print HTML using language lines?

For example

PHP Code:

return [
    'lang' => [
        'in_intl' => 'PHP <a href="" target="_blank">intl Extension</a>.',
        'in_libcurl' => 'PHP <a href="" target="_blank">libcurl Extension</a>.',
        'in_mbstring' => 'PHP <a href="" target="_blank">mbstring Extension</a>.',
        'in_json' => 'PHP <a href="" target="_blank">json Extension</a>.',
        'in_xml' => 'PHP <a href="" target="_blank">xml Extension</a>.',
        'in_mysqlnd' => 'PHP <a href="" target="_blank">mysqlnd Extension</a>.',

PHP Code:
echo lang('requirements.lang.in_intl'); 

Currently this is producing the following
PHP <a href="" target="_blank">intl Extension</a>.

I was expecting to get the parsed HTML

PHP intl Extension

RE: HTML on language lines - neoneeco - 11-25-2020

I don't know, I don't have the solution, but have you test some ideas :

echo (echo lang('requirements.lang.in_intl')); or print_r ? (or something like that ?)

or :
PHP Code:
$return lang('requirements.lang.in_intl');

$a = html_entity_decode($return);


does the eval() function can be applied here ,

RE: HTML on language lines - lucky - 11-26-2020

neoneeco, I've tried that but did not work.

I should explain that I'm using the parser and I'm providing those language lines inside a parser loop.

For example:

PHP Code:

The parser is set to use raw data, so it should work. But it does not :/