Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

sprintf two and more aguments

Go to End



Community Member, 81 Posts

10 June 2010 at 7:33pm

Hello, I'm using sprintf functions in template

<% sprintf( _t('POST_DATE'), $Date.Nice ) %> <% sprintf( _t('POST_AUTHOR'), $Author ) %>

Everything works fine, but when I'm merging this, I'm getting following error:

<% sprintf( _t('POST'), $Date.Nice, $Author) %>

This page contains the following errors:
error on line 102 at column 3: StartTag: invalid element name
Below is a rendering of the page up to the first error.
(Of course, I had also added $lang['en_US']['']['POST'] = '%s %s'; string inside lang file)

So is there anyway to merge this strings in one?