I want to translate KO text.
"You have no items in your shopping cart." "Empty Basket" Already tried with translate.csv it doesn't work.
Is there any way to translating knockout template text in magento2?
I want to translate KO text.
"You have no items in your shopping cart." "Empty Basket" Already tried with translate.csv it doesn't work.
Is there any way to translating knockout template text in magento2?
You Can try this its work for me.
find pub/static -name js-translation.json Add your translation in theme js-translation.json
For Example:
{"You have no items in your shopping cart.":"Empty Basket"} {"Forgot Your Password?":"Forgot Password?"} Once that's done we clear the cache:
php bin/magento cache:clean php bin/magento cache:flush Try following code
<!-- ko i18n: 'You have no items in your shopping cart." "Empty Basket' --><!-- /ko --> Translate it into i18n directory of your module. & last thing is make deploy.
rm -rf pub/static/frontend php -dmemory_limit=1G bin/magento setup:static-content:deploy -f chmod 777 -R var/ pub/static generated/