I have trying to add internationalization to my Rails app. I've read rails guides and all parts of app was internationalized successfully except Submit button. Actually I've translated it partially.
Looked at source code of submit
method, I've read commentary before declaration of the method.
There is part from that commentary:
en:
helpers:
submit:
create: "Create a %{model}"
update: "Confirm changes to %{model}"
I've used that example in my config/locales/??.yml
files. And have a trouble to translate %{model}
. Name of my Model always in english.
How can I translate it?
You can translate specific model names like this, eg for es.yml
:
es:
activerecord:
models:
my_model_name: new_model_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With