devzk Posted May 31, 2017 Share Posted May 31, 2017 (edited) Hello, I'm trying to guess how to make a translation unique inside a foreach in smarty. I tried: {foreach from=$category} <a href="#">{l s='%s' sprintf=$category.name}</a> {/foreach} And also tried: {foreach from=$category} <a href="#">{l s=$category.name}</a> {/foreach} But any of two worked, with the first one I see just '%s' in the translation in BO, and with the second one is not even appearing in BO. I searched and I found a reference to {capture} http://www.smarty.net/docs/en/language.function.capture.tpl but I don't see the relation, because capture works with a unique name so I would be in the same trouble. How can I add as a translation something like the two examples? Thanks. Edited May 31, 2017 by devzk (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now