** 22nd day of calendar planning 2020 ** It's been about 3 months since I started studying programming, so I will leave a note of what I learned in the article as an output. I would be happy if I could help anyone entering the world of programming. Please let me know if there are any words that are wrong, wrong, or misunderstood ^^ I'm sorry if it's hard to read the words for a long time. I will do my best to get used to it little by little.
If it is supposed to be used by Japanese people, it is better to use Japanese in the application! That's why I make a note of what I worked on in Japanese.
that's all
config/application.rb
config.i18n.default_locale = ja
Please describe in the file.
Like this
(I don't think you need en.yml, but I'm scared and haven't erased it ^^; It seems that you can create devise.ja.yml in one shot, so please check it if you are interested.)
Borrow while thanking the ancestors ^^
config/locales/ja.yml
ja:
activerecord:
models:
member: "member"
post: "Post"
attributes:
member:
first_name: "Surname"
last_name: "Name"
email: "mail address"
encrypted_password: "password"
post:
title: "title"
body: "Contents"
I added something like this.
I think it's okay to do all the columns, but I've only done what is displayed, such as where it's used in the error statement.
Also, some people have separated ja.yml for model. I thought it was easier to manage after I finished making it.
Reference site It may be easier to manage if you do it like this. I haven't done it yet, so I'll try it next time.
Recommended Posts