Creating theme-specific translations

Magento offers a powerful system to translate strings used in templates, e-mails, and other components. There are several locations where you can place translations; they are loaded in the following order:

  1. Magento database (inline translations).
  2. Theme translations located in <theme>/i18n/<locale>.csv.
  3. Parent theme translations (until no further parent is specified).
  4. Translation packages located in app/i18n/<locale>.
  5. Module translations located in <module>/i18n/.

Getting ready

In this recipe, we will change a translation for the en_US language; if you want, you can add other languages to your theme also.

How to do it…

This recipe will use the theme created in the Creating a new theme recipe of this chapter, but you can ...

Get Magento 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.