I need to insert a language string inside a Custom HTML module on Joomla (1.7).
Like: K2_READ_MORE
(and not Read more
)
How?
I need to insert a language string inside a Custom HTML module on Joomla (1.7).
Like: K2_READ_MORE
(and not Read more
)
How?
You can do this in this way:
/templates/YOUR-TEMPLATE/html/mod_custom
/modules/mod_custom/tmpl/default.php
At approximately 14th line replace:
<?php echo $module->content; ?>
with:
<?php
if(!function_exists('convertJText')) {
function convertJText($str) { return JText::_($str); };
}
echo preg_replace("/\^\^\^([^\^]+)\^\^\^/ie",'convertJText("$1")', $module->content);
?>
Then you will be able to use translatable strings in your Custom HTML modules by using ^^^K2_READ_MORE^^^