I18n controller-view

hello, could you tell me why this doesn’t work?

controller:

flash[:success] = t(‘flash.added’, :item => t(‘dictionary.challenge’))

en.yml

dictionary:
challenge: Challenge

flash:
added: {{item}} has been successfully created.

On Tue, Jan 26, 2010 at 09:45, Kot M. [email protected]
wrote:

hello, could you tell me why this doesn’t work?

“Doesn’t work” is too unspecific. State your Rails version, if you use
the built-in i18n or the gem (what version?) and how it doesn’t work,
specifically. What do you see, what did you expect to see instead? Any
exception backtraces.

flash:
added: {{item}} has been successfully created.

One thought off the top of my head is that perhaps you need to quote
the added value when it includes curly braces, but that’s a wild
guess.

So try

flash:
added: “{{item}} has been successfully created.”