1

I have added a tag in form.phtml file which shows on view Cart Page.

<h1>Custom Cart Information</h1>

which effects as enter image description here

Hence my store is multi-lingual when i change store view to japanese title SHOPPING CART is getting translated but CUSTOM CART INFORMATION is printing is in english enter image description here

I want this CUSTOM CART INFORMATION tag to be translated whenever i change my store view. Is there any way to do this.

New contributor
Sayyed Hasan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • check your theme has --- i18n this folder – prabhakaran7 2 days ago
  • can you give me path so i can check?? exactly where i18n folder is located in a theme – Sayyed Hasan 2 days ago
  • I have checked in app/design/frontend/vendor/theme/ there is no i18n folder here but the file in which im editing magento/module-checkout has i18n folder. – Sayyed Hasan 2 days ago
0

you need to create that folder

explained in this doc

plz refer

also try with your activated theme folder

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/theme_dictionary.html

0

Finally, i have got solution for this.

Step 1 If you want to translate that tag write in magento format like this.

<h1><label class="label"><?= $block->escapeHtml(__('Custom Cart Information')) ?></label></h1>

Step 2

Add that phrase in your module's i18n/lang_country.csv in my case it is magento_root/vendor/magento/module-checkout/i18n/en_US.csv

Add this phrase at the end of csv file in two columns. enter image description here

Step 3

Find the csv file of your language package in my case path of language pack's csv file is magento_root/vendor/magento-2-japanese-language-pack/ja_JP.csv

Now add translation for your phrase at the end of csv.you have to add 3 columns as English Phrase || Japanese Phrase || Module Name

Add a row like this enter image description here If you dont want to specify the module just write lib and web and dont know the translation of phrase refer google translate.

Step 4

Now, run indexer:reindex cache:flush command and refresh the page. you will see output like this. enter image description here I hope it will work for everyone.

Your Answer

Sayyed Hasan is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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