I want to use my local theme's locale csv file to translate a status message that comes from a plugin and is called in the theme via AJAX. I'm not sure how or where though.
My plugin creates 'packages' of several existing products and shows them as "Joint deals" on a product page. In the CartController.php
this response is made:
$response = $this->prepareResponse([
'status' => 'SUCCESS',
'message' => 'Your package was added to cart',
]);
In my product view.phtml
the response is called via an AJAX call like this:
try {
$j.ajax({
...
success: function(data){
$j('product-a2c-popup popup-content span.content').text(data.message);
So in other words the message is taken from the response straight from the extension. But how/when would I wrap that message in the echo $this->__
format?
If I do it in the extension itself, how would the mark-up be seeing as it is written in an array?