Language

Magento 2 uses csv files for translations per language. This snippet will generate a translation csv file for selected language with one example translation.

  • language: Language for translation file.

Snippet generation

When you generate a module for the language English (United States), it will create a csv translation file in i18n/en_US.csv

Use the snippet in the Magento 2 module creator.

Files

i18n/en_US.csv

"string","stringtranslated"