In this post I am going to explain how to add or generate language translation csv in Magento 2.

In order to add translation csv file in magento2, first you need to create one folder named “i18n” inside your module’s folder.
For Example, app/code/Namespace/Module/i18n

Next to that, create a csv file name of language code.

For Example,

English (United state) -> en_US.csv
French (France) -> fr_FR.csv

In csv file you need to add words and sentences which you want to translate in following way.

Magento2 - How to Add or Generate Language Translation CSV

You can also generate the translation csv file from command line. Here I have generated from my custom module – Ht_Mymodule

Now, open the newly generated csv file and add/edit the words and sentences as per your need.

After done with editing run the static content deploy command.

Note: Without running deploy command you can’t get your localization changes.

Thats it.