I'm building an online store using Magento version 2.1.8. I've created a Luma child-theme.

Magento offers CSV files for translating most of it. But the minicart uses JavaScript for the text strings within it.

enter image description here

How can I overwrite the default English text, for Romanian?

  • If i recall correctly this should be also included in the CSV you mentioned, no matter if it is PHP or JS.
    – mbalparda
    Sep 19, 2017 at 14:52
  • The Magento installation has many CSVs (every module has one). Wich CSV are you writing about? Sep 19, 2017 at 15:01
  • I don't know which text are you trying to translate, but you can try something like this to search in the CSV files github.com/magento/magento2/…
    – mbalparda
    Sep 19, 2017 at 15:46

2 Answers 2


For JS translate you must create language pack with below files.


<?xml version="1.0"?>
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"




/app/i18n/Myshop/ro_ro/ro_RO.csv with your translates (examples):

"Cart Subtotal:","Costul mărfurilor:"
"Go to Checkout","Du-te la checkout"

For apply your store must use Romanian locale, of course. JS translates are stored in /pub/static/frontend/Myshop/Mytheme/ro_RO/js-translation.json.

Remove this file for refresh, clear cache and browser local storage. Enjoy!

  • The file/directory structure is different from yours, in Magento 2 Sep 20, 2017 at 7:33
  • The Vendor directory is directly under root. Sep 20, 2017 at 7:40
  • Vendor in paths in my answer is your vendor, replace it to your development's name. It's not vendor directory under root. Sep 20, 2017 at 13:09
  • What is the right path in Magento version 2.1.8? Sep 20, 2017 at 14:43
  • 1
    i18n inside theme not work for JS translates. It's works in PHP only. Sep 21, 2017 at 11:58

Hello Evgeny Levinsky I have similar issue with italian language. But I'm not understanding where exactly I should create the files which you explained in the above answer. My theme files are stored in following location app/design/frontend/TemplateMonster/theme055 inside that one i18n directory is there but inside that only csv files are there. Should i create inside that or should I create new directory as following app/i18n/TemplateMonster/theme055

Please help about this. this is little urgent.

Thank You, Kishan

Your Answer

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.