Welcome Guest, Not a member yet? Register   Sign In
HTML on language lines
#1

Is there any way to print HTML using language lines?

For example

PHP Code:
<?php

return [
    'lang' => [
        'in_intl' => 'PHP <a href="https://www.php.net/manual/en/book.intl.php" target="_blank">intl Extension</a>.',
        'in_libcurl' => 'PHP <a href="https://www.php.net/manual/en/book.curl.php" target="_blank">libcurl Extension</a>.',
        'in_mbstring' => 'PHP <a href="https://www.php.net/manual/en/book.mbstring.php" target="_blank">mbstring Extension</a>.',
        'in_json' => 'PHP <a href="https://www.php.net/manual/en/book.json.php" target="_blank">json Extension</a>.',
        'in_xml' => 'PHP <a href="https://www.php.net/manual/en/book.libxml.php" target="_blank">xml Extension</a>.',
        'in_mysqlnd' => 'PHP <a href="https://www.php.net/manual/en/book.mysqlnd.php" target="_blank">mysqlnd Extension</a>.',
    ],
]; 


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

Currently this is producing the following
Code:
PHP <a href="https://www.php.net/manual/en/book.intl.php" target="_blank">intl Extension</a>.

I was expecting to get the parsed HTML

PHP intl Extension
Reply
#2

Hi
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);

echo 
$a


does the eval() function can be applied here ,
Reply
#3

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:
{languages}
    {
lang_line}
{/
languages

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




Theme © iAndrew 2016 - Forum software by © MyBB