Magento – Magento 2 translate the “You added … to your shopping cart.” line

addtocartcartjs-translationlocalisationmagento2

I'm trying to translate the "You added … to your shopping cart." line in my Magento 2 installation.
I have already a .csv file in: "app/design/themevendor/themename/i18n/" with all the lines translated,
and I have also translated the lines into "vendor/magento/module-checkout/Controller/Cart/Add.php" but the line that comes out when you add a to cart a product is still in English!

Also, this line has the last part, "shopping cart" as a link, the ones I have translated were just normal lines, so I think the one I'm trying to translate, is built from 2 parts, but I just can't find it.

Best Answer

I have actually managed to find the solution myself, the right file to edit is: "vendor/magento/module-checkout/view/frontend/templates/messages/addCartSuccessMessage.phtml"

Related Topic