PLZ HELP!! How to translate "ADD TO CART" button to different languages, in the product detail page ?
8 answers
Hi mate,
you can open the file of app\design\frontend\default\jm_booktemplate\catal og\product\view.phtml there you would see this
HTML Code:
<span><span><i class="icon-shopping-cart"></i>Add to Cart</span>
you change it to
HTML Code:
<span><span><i class="icon-shopping-cart"></i> <?php echo $this->__('Add to Cart'); ?></span>
and now the text can be translated as normal at locale files
thank you!Sherlock Holmes! It works.
I just changes this, thank you.
What is the code to do the same for "shopping cart" & "Settings"
Look to "app/design/frontend/default/jm_book/layout" folder -- Most of the required files should be located there.
In case you are missing any files in the "app/design/frontend/default/jm_book/layout" folder, you can edit them in the "app/design/frontend/base/default/layout" folder
For example, to edit the "My Account" name . . .
Open customer.xml file. There locate the following code:
Code:
<default> <!-- Mage_Customer --> <reference name="top.links"> <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action> </reference> </default>
In order to change the menu button name, change the <label> value (<label>My Account</label>)
In the case of the shopping cart, "Add to Cart" was changed to "<?php echo $this->__(‘Add to Cart’); ?>" so that language packwould update it.
Do you what the magneto default is for "shopping cart" & "Settings"
if you go to the file of app\design\frontend\default\jm_booktemplate\page\ html\jmtoolbar.phtml you would see
PHP Code:
<?php echo $this->__('Setting') ?>
and
PHP Code:
<?php echo $this->__("Shopping Cart ") ?>
this mean those texts are able to be translated, now you can create the file app\design\frontend\default\jm_book\locale\your_la nguage_codetranslate.csv and put the translated lines for those mentioned text there.
I did as instructed, but it did not work. Can you please review my effort: Attachment 33968
This question is now closed