Have added a translate.csv file in my template and tried to add the following, but they do not get translated:
You have <a href="%s">
items</a> in your cart.
You have <a href="%s">1 item</a> in your cart.
Have found the file that generates the translated text in app/design/frontend/default/jm_hawkstore/template/jmajaxcart:
<p class="amount"><?php echo $this->__(‘You have <a href="%s">1 item</a> in your cart.’, $this->getUrl(‘checkout/cart’)) ?></p>
<p class="amount"><?php echo $this->__(‘You have <a href="%s">’.count($_items).’ items</a> in your cart.’, $this->getUrl(‘checkout/cart’), $_cartQty) ?></p>
If I hardcode translate the text it get translated correct.
Also in the ajax cart at the top it says "X items". Where and what should I write to translate it? Have tried to add "%s items" but it doesn’t get translated.
Also the text QTY next to the quantity field I cannot find where to translate.
Notice: I can’t just hardcode translate it as our site is in 5 different languages.
Thank you
-
Hi, can I ask how you resolved this? I have the same issue.
11 answers
Please PM me admin and ftp credentials of your site, I will check and help you out.
I have sent a PM with admin and ftp details.
Hi.
I can not login to the FTP you provided. Please re-check and PM me again.
Have PM’ed you again with the details.
Please re-check PM from me.
Thanks
Please re-check PM from me
To translate text "items", you can edit file app\code\local\Wavethemes\Jmquickbuy\controllers\I ndexController.php, about line 186, find and replace this rule:
Code:
echo Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty().' items';
With:
Code:
echo Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty().$this->__(' items');
Don’t know if you corrected this for me because the code is already displaying as you suggest. Have added the ‘ items’ in the translate.csv for my theme and cleared cache, but it doesn’t load. Also the text "You have <a href="%s">" "items</a> in your cart." is not translated anymore.
In the attached image you will see me translate.csv file
Attachment 40004
I have helped you to resolve it.
Please re-check
Thanks, but it still shows the text "2 items". See attached image
Please check PM.