Jump to content

Error messages translation


mysho

Recommended Posts

I am not able to find the way how to translate error messages. In this case I am trying to find where the message "You have not reached the minimum amount required to use this voucher" is.

 

This message shows in the shopping cart when you try to use a voucher, but you have not reached the minimum amount of your order. 

 

Does anyone have any idea?

 

PS 1.7.0.3

 

THX!

Link to comment
Share on other sites

  • 2 weeks later...

Any idea where to translate error messages? I don't care if it's in the BO, DB or hardcode.

 

//edit: I have found some phrases in /web/controllers/front/CartController.php, but this message "You have not reached the minimum amount required to use this voucher" isn't there.

Edited by mysho (see edit history)
Link to comment
Share on other sites

I searched PrestaShop v1.7.0.4 and found that message on line 701 of classes/CartRule.php:

                return (!$display_error) ? false : Tools::displayError('You have not reached the minimum amount required to use this voucher');

In PrestaShop v1.6, it's translated in translations\en\errors.php like the following:

$_ERRORS['dc0c81278849e0f6a297e93c935e465d'] = 'You have not reached the minimum amount required to use this voucher';

Unfortunately, PrestaShop v1.7 uses a different translation system, so I don't know how to manually add a translation.

 

PrestaShop wrote here that they are expanding the translation scope in PrestaShop v1.7.1.0 next month, so hopefully, it will become translatable then.

Link to comment
Share on other sites

  • 4 years later...

Sir i want to show a translatable error message in form. means when customer choose different language and submit form error show in that language which is he choose. so how can we do that? i have to use $this->trans('error message'); something like this?

Thanks if you can help me. ♥

Edited by jugalfas (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...