1

I have a multilanguage store.

I used the GitHub method to install relevant language packs The file containing the different language packs is located at /var/www/html/magento/app/i18n/Mageplaza Each language pack such as fr_fr, ar_sa is composed of: composer.json, language.xml, license, registration.php, fr_FR.csv

I have almost everything translated on the website except some special strings:

1-Quantity (on the product page)

2- My wishlist and Compare near the Search bar

3-The whole checkout after I click on add to cart including VIEW CART, GO TO CHECKOUT and you added ....... product to the shopping cart

I tried to put those strings in my CSV file but all of them were not translated to the target language.

Do i need to install another language pack under vendor (/var/www/html/magento/vendor/magento)

I have some preinstalled language pack under vendor/magento but no CSV file inside (has only composer, language.xml, registration.php,..) or i need to install language pack in relevant modules /var/www/html/magento/vendor/magento/module-checkout/i18n

I have an i18n file under module-checkout under vendor but only an English CSV file inside, no XML or JSON...

What I should do?

1 Answer 1

0

You can translate text by creating en_US.csv file under i18n folder, You can create at two places for translation of text at theme level and module level.

For Theme level, app/design/frontend/{Vendorname}/{themename}/i18n/en_US.csv

For Module Level,

app/code/{Vendorname}/{Modulename}/i18n/en_US.csv

Now under en_US.csv, the left side is your main content and the right column defines the translated text,

"Grand Total","Total"

Now at all of your grand total text convert to total only.

Run the below command to see changes,

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

php bin/magento cache:flush

2
  • yeah i have already put translation in my csv file as mentionned above , everything was translated except those special strings
    – Amine
    Dec 26, 2021 at 9:07
  • Can you be more specific about your string? If I can know what specific string you want to translate maybe I can help you more Dec 28, 2021 at 1:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.