Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Using value from I18N for id
3 Posts
Using value from I18N for id

Hey Wouter,

Actually, the problem is with the data representation here,


here the interpreter actually counting "" as two different strings and code inbetween is the simple html data thats why it showing some errors.

The better way to write the code is first use single quote and then double like

It will work.....

what does 'content' do?

did you try <h3 id="<%= "short_#{I18n.locale}"%>"> ?


I'd like to use the value of the current i18n to create an id for a header-tag. I'm trying to do this, but I'm not getting a value in my id.(see pastie)

If I hardcode this, it is working, (see pastie)


What am I doing wrong?

3 Posts
Login to add your message