If you add a translation to a language CSV file (such as de_DE.csv), it may not be included correctly in your theme’s js-translation.json . Consequently, messages such as validation errors remain untranslated. To fix this, override vendor/magento/module-translation/Model/Json/PreProcessor.php and make the following change:

becomes

After redeploying the static content, your translation should appear in your theme’s js-translation.json and work on the storefront.

JavaScript translations are not working
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.
Tags: