- 10 November 2010
- developing
- 0 Comments
Sometimes you want to write in your ini files something like
MESSAGE=Thank you for registration, %s! Now you can <a href="%s">login</a>.
and then while displaying this message substitute necessary strings instead of %s.
So. Joomla does allow this but only for language files. To parse this message you should write
JText::sprintf('MESSAGE', $username, $url)
The first parameter is property name. The second parameter $username goes for first %s, $url goes for second %s and so on.