Magento – How to Translate Strings in Different Store Views

inline-translationslocalisationmultistorestore-view

i have a megento store with the theme "trego" this theme have a contact form page , but have only with the default language "english", in store have 2 language (the other language is french)

now in this page compare some text line in english, how translate this in french for that when you change the language to the store will also change the text?

the file form is called "form.phtml" and folder "app/design/frontend/default/trego/template/contacts"

this is a code in form.phtml

<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
<div class="page-title">
    <h1><?php echo Mage::helper('contacts')->__('Contact Us') ?></h1>
</div>

<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">
    <div class="block block-contactform">
        <div class="block-title">
            <strong><span><?php echo Mage::helper('contacts')->__('Leave Comment') ?></span></strong>
        </div>
        <div class="block-content">
            <ul class="form-list">
                <li class="fields">
                    <div class="field">
                        <div class="input-box">
                            <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" placeholder="<?php echo $this->__('Enter Your Name *')?>" />
                        </div>
                    </div>
                    <div class="field">
                        <div class="input-box">
                            <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" placeholder="<?php echo $this->__('Enter Your Email *')?>" />
                        </div>
                    </div>
                    <div class="field">
                        <div class="input-box">
                            <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text"  placeholder="<?php echo $this->__('Enter Your Telephone')?>" />
                        </div>
                    </div>
                </li>
                <li class="wide">
                    <div class="input-box">
                        <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="5" rows="3" placeholder="<?php echo $this->__('Your Comment *')?>" ></textarea>
                    </div>
                </li>
                <?php echo $this->getChildHtml('form.additional.info'); ?>
                <li class="wide required for-mobile">
                    <p class="required"><?php echo Mage::helper('contacts')->__('Your email address will not be published. Required 
fields are marked ') ?><em>*</em></p>
                </li>
                <li class="wide form-button">
                    <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
                    <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
                </li>
                <li class="wide required for-desktop">
                    <p class="required"><?php echo Mage::helper('contacts')->__('Your email address will not be published. Required 
fields are marked ') ?><em>*</em></p>
                </li>
            </ul>
        </div>
    </div>
</form>
<script type="text/javascript">
//<![CDATA[
    var contactForm = new VarienForm('contactForm', true);
//]]>
</script>
</div>

these are some texts that I wish they were translatable

1) Enter Your Name *'
2) Enter Your Email *
3) Enter Your Telephone
4) Your Comment *
5 LEAVE COMMENT

how can I do? or is there any extension ??
this is a demo of theme :

http://www.newsmartwave.net/trego/demo5_default/contacts/

thanks fo answer

Best Answer

Please see this - http://blog.belvg.com/editing-magento-translate-csv-file.html . In your case create a file app/design/frontend/default/trego/locale/fr_FR/translate.csv and in it put this:

"Enter Your Name *","the text in French"
"Enter Your Email *","the text in French"
"Enter Your Telephone","the text in French"
"Your Comment *","the text in French"
"Leave Comment","the text in French"
Related Topic