O'Reilly logo

Learn Rails 5.2: Accelerated Web Development with Ruby on Rails by Stefan Wintermeyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Stefan Wintermeyer 2018
Stefan WintermeyerLearn Rails 5.2https://doi.org/10.1007/978-1-4842-3489-1_12

12. Internationalization

Stefan Wintermeyer
(1)
Bochum, Germany
 
If you are in the lucky situation of creating web pages in English only, then you can skip this chapter completely.
But even if you want to create a web page that uses only one language (other than English), you will need to dive into this chapter. It is not enough to just translate the views. If you use scaffolding, you will still need to take care of the not yet translated validation errors.
The class I18n is responsible for everything having to do with translation in the Rails application. It offers two important methods for this purpose.
  • I18n.translate or I18n.t: Takes care of inserting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required