X
    Categories: Knowledgebase

How to translation text by csv file in magento2

To add translation csv file in magento2, you just need to add a folder named:

“i18n” inside your module’s folder, i.e.

app/code/Magebay/TestModule/i18n

Then create a csv file with name of language code.

forexample:

for english (United state) => en_US.csv

french (canada)=>fr_CA.csv

Inside csv file you just need to add words which you want to translate, in following manner:

“<word in english language>”,”<word in language to convert>”

for example:

Now, define your word at place of use:

<?php echo __('Store Title');?>

Hope it helps !

Kien Wiliam: Magento Ecommerce Developer