Magento – Magento 2 – translating problem with JS strings

javascriptlocalisationmagento2

I'm trying to translate my website content. Everything worked fine
expect the validation messages which come from mage/validation.js, and the minicart content translation is not showing on the frontend too.

Best Answer

You must override that file in your theme en app/design/frontend/VENDOR/THEME/web/mage/validation.js and your string for translate must be this away:

$.mage.__('Text to translate')
Related Topic