Reputation: 389
I am using the form_for
helper to produce the edit and new form for a model in one go. The submit presents different strings (e.g. Create Model). However I need these strings to be in German along with a German model name. Is it possible to pass these two Strings to f.submit
?
Upvotes: 0
Views: 153
Reputation: 7625
The localisation for the submit button can be found here.
Just create a new file config/locales/de.yml
and don't forget to change the default language in the config/application.rb
.
de:
helpers:
submit:
create: "Erstelle %{model}"
update: "Ändere %{model}"
activerecord:
models:
user: Benutzer
Upvotes: 1
Reputation: 11876
use rails internationalization create yml files for different languages. In details go to this link http://guides.rubyonrails.org/i18n.html
Upvotes: 0