...
Some definitions contain variable substitutions, which can be identified by their syntax: %N$s, where N is a number (1, 2, ...). The $ in the variable name is escaped by a backslash (\) , as the $ character has special meaning in double-quoted (") strings.
Code Block |
---|
language | php |
---|
title | /installdir/language/en_us/admin_clients.php |
---|
linenumbers | true |
---|
|
$lang['AdminClients.!success.makepayment_processed'] = "The payment was successfully processed for %1\$s. Transaction Number: %2\$s"; // %1$s is the payment amount, %2$s is the transaction number |
Info |
---|
title | Variables can appear in any order |
---|
|
The example above could easily have been written as "The payment was successfully processed! Transaction Number: %2\$s, Amount: %1\$s". |