API17:JText::sprintf
From Joomla! Documentation
JText::sprintf
Description
Passes a string thru a sprintf.
public static function sprintf (
$string
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| $string | string | The format string. | |
| mixed | Mixednumberofargumentsforthesprintffunction. | ||
| array | optionalArrayofoptionarray('jsSafe'=>boolean,'interpretBackSlashes'=>boolean,'script'=>boolean)where-jsSafeisabooleantogenerateajavascriptsafestrings-interpretBackSlashesisabooleantointerpretbackslashes\->\,
->newline,->tabulation-scriptisabooleantoindicatethatthestringwillbepushinthejavascriptlanguagestore |
- Returns string The translated strings or the key if 'script' is true in the array of options
- Defined on line 242 of libraries/joomla/methods.php
- Since

- Referenced by
- JHtml::_
- JTableNested::_getNode
- JInstallerLanguage::_install
- JModuleHelper::_load
- JComponentHelper::_load
- JFTP::_mode
- JFTP::_passive
- JFTP::_putCmd
- JFTP::_verifyResponse
- JHtmlRules::assetFormWidget
- JAuthentication::authenticate
- JTable::bind
- JControllerForm::cancel
- JFTP::chdir
- JTableNested::check
- JTableUser::check
- JTableMenuType::check
- JTableMenu::check
- JTable::checkIn
- JControllerAdmin::checkin
- JTable::checkOut
- JFTP::chmod
- JLoggerDatabase::connect
- JFTP::connect
- JStream::copy
- JFile::copy
- JInstaller::copyFiles
- JFTP::create
- JController::createView
- JFolder::delete
- JTableMenuType::delete
- JFTP::delete
- JFile::delete
- JInstallerTemplate::discover_install
- JInstallerComponent::discover_install
- JInstallerHelper::downloadPackage
- JControllerForm::edit
- JController::execute
- JFolder::files
- JFolder::folders
- JFTP::get
- JFormFieldGroupedList::getGroups
- JFormFieldModuleLayout::getInput
- JFormFieldComponentLayout::getInput
- JFormFieldRules::getInput
- JUser::getInstance
- JTable::getInstance
- JDatabase::getInstance
- JCacheStorage::getInstance
- JRouter::getInstance
- JPathway::getInstance
- JModel::getInstance
- JController::getInstance
- JApplication::getInstance
- JTable::getNextOrder
- JPagination::getPagesCounter
- JTableNested::getPath
- JPagination::getResultsCounter
- JTableNested::getRootId
- JModel::getTable
- JTableNested::getTree
- JController::getView
- JTable::hit
- JInstallerTemplate::install
- JInstallerPlugin::install
- JInstallerPackage::install
- JInstallerLibrary::install
- JInstallerComponent::install
- JInstallerModule::install
- JInstallerLanguage::install
- JInstallerFile::install
- JFTP::listDetails
- JFTP::listNames
- JUser::load
- JTable::load
- JToolBar::loadButtonType
- JPackageManifest::loadManifestFromXML
- JLibraryManifest::loadManifestFromXML
- JView::loadTemplate
- JFTP::login
- JFTP::mkdir
- JFolder::move
- JTable::move
- JFile::move
- JTableNested::moveByReference
- JTableNested::orderDown
- JTableNested::orderUp
- JInstaller::parseFiles
- JInstaller::parseLanguages
- JInstaller::parseMedia
- JInstaller::parseQueries
- JInstaller::parseSchemaUpdates
- JInstaller::parseSQLFiles
- JTableNested::publish
- JTable::publish
- JFTP::pwd
- JDatabaseSQLSrv::query
- JDatabaseSQLAzure::query
- JDatabaseMySQLi::query
- JDatabaseMySQL::query
- JFTP::read
- JFile::read
- JTableNested::rebuildPath
- JInstaller::refreshManifestCache
- JDispatcher::register
- JFTP::reinit
- JFTP::rename
- JDocumentRendererRSS::render
- JDocumentRendererAtom::render
- JToolBar::renderButton
- JTable::reorder
- JControllerAdmin::reorder
- JFTP::restart
- JControllerForm::save
- JTableNested::saveorder
- JControllerAdmin::saveorder
- JMail::sendAdminMail
- JTableNested::setLocation
- JMail::setSender
- JDatabase::stderr
- JTableNested::store
- JTableUser::store
- JTableMenuType::store
- JTable::store
- JFTP::store
- JFTP::syst
- JFormRuleEquals::test
- JFormRule::test
- JInstallerTemplate::uninstall
- JInstallerPlugin::uninstall
- JInstallerPackage::uninstall
- JInstallerComponent::uninstall
- JInstallerModule::uninstall
- JInstallerComponent::update
- JInstallerLanguage::update
- JFile::upload
- JForm::validateField
- JFTP::write
- JFile::write
See also
JText::sprintf source code on BitBucket
Class JText- Other versions of JText::sprintf
User contributed notes
Code Examples