jtext($string, $jsSafe = false, $interpretBackSlashes = true, $script = false)
This function is a proxy of Joomla\CMS\Language\Text::_(). It allows to use translatable strings inside twig layouts.
Parameters
string$string The string to translate.mixed$jsSafe Boolean: Make the result javascript safe.boolean$interpretBackSlashes To interpret backslashes (\=\, \n=carriage return, \t=tabulation).boolean$script To indicate that the string will be push in the javascript language store:
Returns
string The translated string or the key if $script is true.
Examples
{# Display the translation of the JENABLED language string. It will display something like:
"Something is enabled" #}
Something is {{ jtext('JENABLED') }}