Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques statiques | |
static | _ ($string, $jsSafe=false, $interpretBackSlashes=true, $script=false) |
static | alt ($string, $alt, $jsSafe=false, $interpretBackSlashes=true, $script=false) |
static | plural ($string, $n) |
static | sprintf ($string) |
static | printf ($string) |
static | script ($string=null, $jsSafe=false, $interpretBackSlashes=true) |
static | getScriptStrings () |
Attributs protégés statiques | |
static | $strings = array() |
Fonctions membres privées statiques | |
static | passSprintf (&$string, $jsSafe=false, $interpretBackSlashes=true, $script=false) |
Text handling class.
Translates a string into the current language.
Examples: ‘<script>alert(Joomla.JText._(’<?php echo Text::_("JDEFAULT", array("script"=>true)); ?>'));</script>‘ will generate an alert message containing 'Default’ <?php echo Text::_("JDEFAULT"); ?>
will generate a 'Default' string
string | $string | The string to translate. |
mixed | $jsSafe | Boolean: Make the result javascript safe. |
boolean | $interpretBackSlashes | To interpret backslashes (\=\, =carriage return, =tabulation) |
boolean | $script | To indicate that the string will be push in the javascript language store |
Références Language\$lang, $script, et Factory\getLanguage().
Référencé par Stream\chmod(), Stream\close(), Folder\create(), Folder\delete(), Stream\eof(), Stream\filesize(), Stream\get_meta_data(), Stream\gets(), ToolbarHelper\modal(), File\move(), Folder\move(), PlgContentConfirmConsent\onContentPrepareForm(), Stream\open(), Stream\read(), ExceptionHandler\render(), Stream\seek(), Stream\tell(), ToolbarHelper\title(), File\upload(), Stream\upload(), ToolbarHelper\versions(), et Stream\write().
Translates a string into the current language.
Examples: ‘<?php echo Text::alt('JALL’, 'language'); ?>‘ will generate a 'All’ string in English but a "Toutes" string in French ‘<?php echo Text::alt('JALL’, 'module'); ?>‘ will generate a 'All’ string in English but a "Tous" string in French
string | $string | The string to translate. |
string | $alt | The alternate option for global string |
mixed | $jsSafe | Boolean: Make the result javascript safe. |
boolean | $interpretBackSlashes | To interpret backslashes (\=\, =carriage return, =tabulation) |
boolean | $script | To indicate that the string will be pushed in the javascript language store |
Références $alt, $script, Factory\getLanguage(), et Language\hasKey().
|
static |
Get the strings that have been loaded to the JavaScript language store.
|
staticprivate |
Checks the string if it should be interpreted as sprintf and runs sprintf over it.
string | &$string | The string to translate. |
mixed | $jsSafe | Boolean: Make the result javascript safe. |
boolean | $interpretBackSlashes | To interpret backslashes (\=\, =carriage return, =tabulation) |
boolean | $script | To indicate that the string will be push in the javascript language store |
Références $i, Language\$lang, $script, et Factory\getLanguage().
|
static |
Like Text::sprintf but tries to pluralise the string.
Note that this method can take a mixed number of arguments as for the sprintf function.
The last argument can take an array of options:
array('jsSafe'=>boolean, 'interpretBackSlashes'=>boolean, 'script'=>boolean)
where:
jsSafe is a boolean to generate a javascript safe strings. interpretBackSlashes is a boolean to interpret backslashes \->\,
->new line, ->tabulation. script is a boolean to indicate that the string will be push in the javascript language store.
Examples: ‘<script>alert(Joomla.JText._(’<?php echo Text::plural("COM_PLUGINS_N_ITEMS_UNPUBLISHED", 1, array("script"=>true)); ?>'));</script>‘ will generate an alert message containing '1 plugin successfully disabled’ ‘<?php echo Text::plural('COM_PLUGINS_N_ITEMS_UNPUBLISHED’, 1); ?>‘ will generate a '1 plugin successfully disabled’ string
string | $string | The format string. |
integer | $n | The number of items |
Références $count, $key, Language\$lang, $n, $suffix, et Factory\getLanguage().
|
static |
Passes a string thru an printf.
Note that this method can take a mixed number of arguments as for the sprintf function.
string | $string | The format string. |
Références $count, Language\$lang, et Factory\getLanguage().
Translate a string into the current language and stores it in the JavaScript language store.
string | $string | The Text key. |
boolean | $jsSafe | Ensure the output is JavaScript safe. |
boolean | $interpretBackSlashes | Interpret and . |
Références HTMLHelper\_(), Log\add(), Factory\getDocument(), Factory\getLanguage(), null, et Log\WARNING.
|
static |
Passes a string thru a sprintf.
Note that this method can take a mixed number of arguments as for the sprintf function.
The last argument can take an array of options:
array('jsSafe'=>boolean, 'interpretBackSlashes'=>boolean, 'script'=>boolean)
where:
jsSafe is a boolean to generate a javascript safe strings. interpretBackSlashes is a boolean to interpret backslashes \->\,
->new line, ->tabulation. script is a boolean to indicate that the string will be push in the javascript language store.
string | $string | The format string. |
Références $count, Language\$lang, et Factory\getLanguage().
Référencé par File\append(), Patcher\applyHunk(), File\copy(), File\delete(), Folder\delete(), Folder\files(), Folder\folders(), File\move(), Folder\move(), File\read(), File\upload(), et File\write().
|
staticprotected |