How to use i18n file for translation on the site?

Created by Rosa Truong, Modified on Wed, 20 May 2020 at 10:33 AM by Rosa Truong

Question

How can we edit text labels and remove input fields? For instance, we would like to adjust input fields of the address section. 


Answer:


About your query, we would like to give you the guide for using the i18n file for translation.


Please follow these steps:


Step 1: Locate the theme directory usually located in app/design/frontend/<vendor>/<theme-name>/


Example: app/design/frontend/cableorganizer/theme-frontend-luma-child/


Step 2: Locate the i18n folder 


+ In the theme



+ In the module:


Step 3: Create a CSV file that matching your store language


For example: if you're using English the CSV file should be named en_US.csv if France it should be rf_FR.csv.


Step 4: Change the content according to your desire output


For example: if you want the word "Add To Cart" change to "Buy" for store English store view, create an en_US.csv file with 2 columns using the comma-separated. The first column is the original words and the second column are output words.


Step 5: Save the CSV file and put it into the i18n folder then re-deployment of static content.


Magento 2 official guide with the advanced command line: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/translate_practice.html


If you need any further assistance, please feel free to contact us via email sales@bsscommerce.com

We're more than happy to support you.






Attachments (1)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us how can we improve this article!

Select atleast one of the reasons

Feedback sent

We apprciate your effort and will try to fix the article