JText/: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
Line 4: | Line 4: | ||
===Syntax=== | ===Syntax=== | ||
Line 39: | Line 39: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=_ | category=_ | ||
category=JText | category=JText | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> |
Latest revision as of 02:13, 25 March 2017
Description
Translates a string into the current language.
Syntax
static _($string, $jsSafe=false)
Parameter Name | Default Value | Description |
---|---|---|
$string | $string The string to translate. | |
$jsSafe | false | $jsSafe Make the result javascript safe. |
Defined in
libraries/joomla/methods.php
Importing
jimport( 'joomla.methods' );
Source Body
public static function _($string, $jsSafe = false)
{
$lang = &JFactory::getLanguage();
return $lang->_($string, $jsSafe);
}
Examples
Code Examples