Gloc and sprintf?

I am trying to use a combination of gloc and sprintf on my
multilingual website.
If I do this:
<%=sprintf(l(:film_info_minutes),film.duration) %>

I get a compile error:
Translation value “%d minutes” with arguments [] caused error ‘too few

but if I do:
<%=sprintf("%d minutes",film.duration) %>

it works fine. Please tell me that its possible to nest gloc with a
sprintf! What am I doing wrong?


Solved it! (embarassing yourself in public is such a good motivator!)

I needed to simply do:
<%=l(:film_info_minutes, film.duration)%>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs