views:

77

answers:

2

I got index.erb and index-de.erb, and somewhere I saw an example where this resulted in index-de being rendered when I18n.locale was :de, but i just tried and it did not work and I could not find any documentation on this subject. So does this actually work or do I need an extra plugin for this ?

+1  A: 

Localization is built into rails as of 2.2; you'll probably want to check out the i18n screencast and/or the guide.

Edit: in particular check out the guide's section 3.3, "Localized Views". The short answer is that the correct filename is index.de.html.erb.

Sam
A: 

they must be named index.LOCALE.EXTENSION so e.g. index.de.erb or index.de.html.erb for de locale (I18n.locale)

grosser