PLZ HELP!! How to translate "ADD TO CART" button to different languages?

PLZ HELP!! How to translate "ADD TO CART" button to different languages, in the product detail page ?

8 answers

Profile photo of Sherlock 0.00 $tone November 25, 2013
Public

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

#1
Profile photo of tomc 0.00 $tone February 13, 2014
Public

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>)

#4
Profile photo of Anthony Barba 0.00 $tone February 13, 2014
Public

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"

#5
Profile photo of Sherlock 0.00 $tone February 14, 2014
Public

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.

#6

This question is now closed

Written By

Comments