Generally, an extension consists of specific elements (i.e. interface, settings display, added content) which can be translated to another language. When making a translation, as the first step, look through the module's elements in the Admin panel — some of them can be edited on a store view scope, making it possible to translate them directly from the Admin panel. For the remaining parts of the module (in most cases, interface, frontend display, etc.), the translation needs to be done in the files.
To translate an extension via files, follow the steps below.
Step 1. Connect to your server via SFTP, navigate to app/code/Amasty/ExtensionName
or vendor/amasty/extension-name
and download the en_US.csv
file to your computer.
Step 2. Rename the file to match the required language code (i.e. pt_BR.csv
) and open it in a text editor you find convenient.
Step 3. In the file, all lines consist of two parts separated by a comma. The right part of the string should be replaced with the translated text, as follows:
Step 4. Proceed with translating all the needed lines and save the file when finished. If the existing line you are looking for is not present in the file, it can be added and translated similarly to the rest:
Step 5. To make the changes show, upload the file to the same path via SFTP and run the following CLI commands from the root Magento directory:
rm -rf pub/static/*
php bin/magento set:static-content:deploy
php bin/magento cache:flush
Some extensions have backend and storefront separated (i.e. GiftCard for backend and GiftCardAccount for storefront); please consider that when translating.