I'm already having a lot of trouble translating some Magento 2 texts, but I really can't seem figure this one out. I'm trying to translate the "This is a required field." text to Dutch. I already tried editing it in my nl_NL.csv, in which other texts are being translated as well. I deployed, cleared my cache, removed my pub/static folder, all of which do not give me a result.

How do I do this?

enter image description here

  • You need to modify core JS file. Commented Jun 27, 2017 at 11:03
  • This text is non translatable. If your store is not multilingual you can change the text in the validation.js file. (This is not recommended though). You can override the function in rules.js in your theme at this path : app/designVendor/themename/Magento_Ui/web/js/lib/validation/‌​rules.js
    – Sejal Shah
    Commented Jun 28, 2017 at 5:51

1 Answer 1


To revive an old question with one of possibly many solutions, the text can be translated through a custom JavaScript file. Within this file you can override / apply the same validation rule as the existing required-entry rule and pass it a translation.

To do this you need the following:


], function($) {
    $(document).ready(function() {
            'required-entry', function (value) {
                return (value !== '');
            }, $.mage.__('This is a required field.'));


var config = {
    map: {
        '*': {
            'translations': 'js/translations'


"This is a required field.", "Dit is een verplicht veld"

I hope this helps people who, like me, ran into this problem.

  • Hey @Mike, Can you be a bit more specific on where to put the files? Might be obvious for you, but I have no idea.
    – Rick
    Commented Jul 26, 2019 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.