How to translate Rails into Japanese in general

Introduction

I didn't want to express the application I'm working on in English as much as possible, so I investigated and summarized it.

flow

  1. Write Gem
  2. bundle install
  3. File generation
  4. Modify the file if necessary

1. Write Gem

Gemfile


gem 'i18n_generators'

Add the above Gem

  1. bundle install As usual, in the terminal
bundle install

To execute.

3. File generation

Also at the terminal

rails g i18n_locale ja

To execute. With this command config/locales/ja.yml Is generated.

4. Modify the file if necessary

If you want to change the time display when displaying the time with the l method, It is good to put a correction on the 204th line. Also, if you want to prepare some patterns depending on the display location, you can customize it on lines 205 and 206.

Finally

I felt that it was a fairly important gem because I could customize and display my own units in Japanese.

Recommended Posts

How to translate Rails into Japanese in general
[Rails] How to translate devise into Japanese
[Rails] How to write in Japanese
[Rails] validates How to translate error sentences into Japanese
[Ruby on Rails] How to write enum in Japanese
How to introduce jQuery in Rails 6
How to install Swiper in Rails
How to implement search functionality in Rails
How to change app name in rails
How to use custom helpers in rails
How to insert a video in Rails
How to use MySQL in Rails tutorial
[rails] How to configure routing in resources
How to implement ranking functionality in Rails
How to use credentials.yml.enc introduced in Rails 5.2
How to display error messages in Japanese
How to translate enum into Japanese and generate linked radio buttons
How to write Rails
[Rails] Let's translate the error message into Japanese
[Rails] How to use select boxes in Ransack
How to prevent direct URL typing in Rails
How to uninstall Rails
How to separate .scss by controller in Rails
How to conditionally add html.erb class in Rails
How to implement a like feature in Rails
How to easily create a pull-down in Rails
How to use JQuery in js.erb of Rails6
[Rails] How to use Gem'rails-i18n' for Japanese support
[Ruby on Rails] How to install Bootstrap in Rails
How to make a follow function in Rails
[Rails] How to use PostgreSQL in Vagrant environment
How to check Rails commands in the terminal
[Rails] How to convert UC time display to Japanese time display
How to set the display time to Japan time in Rails
How to implement guest login in 5 minutes in rails portfolio
How to implement a like feature in Ajax in Rails
Change date and time to Japanese notation in Rails
[Ruby On Rails] How to reset DB in Heroku
[How to insert a video in haml with Rails]
How to write a date comparison search in Rails
How to query Array in jsonb with Rails + postgres
[Rails 6] How to set a background image in Rails [CSS]
[Rails] How to load JavaScript in a specific view
[Rails] How to display an image in the view
[rails] How to post images
[Rails] How to use enum
[Rails] How to install devise
How to use rails join
How to terminate rails server
How to write Rails validation
How to write Rails seed
[Rails] How to use validation
[Rails] How to disable turbolinks
[Rails] How to use authenticate_user!
[Rails] How to use "kaminari"
[Rails] How to implement scraping
[Rails] How to make seed
How to write Rails routing
[Rails] How to install simple_calendar
[Rails] How to install reCAPTCHA
How to translate the error message into Japanese (What to do if you cannot log in for some reason)