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:
- Magento database (inline translations).
- Theme translations located in
<theme>/i18n/<locale>.csv
. - Parent theme translations (until no further parent is specified).
- Translation packages located in
app/i18n/<locale>
. - 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.