Pages

Friday 29 March 2013

Language convert | products name change according to selected language

How to change products name, description etc. according to selected language.
Pollow the path: app/design/frontend/base/default/template/page/switch/ language.phtml

Replace with existing code:

<?php
/**
 * Language switcher template
 *
 * @see Mage_Page_Block_Switch
 */
?>
<div class="form-language">
    <label for="select-language"><?php echo $this->__('Your Language:') ?> </label>

<!-- Google Element Translator Styling-->
        <style>
            .goog-te-combo{width: px !important;}
            .goog-te-balloon-frame{display: none !important;}
            font{background: transparent !important;}
            a font:hover{ color:  !important;}
            #google_translate_element{height: 26px !important;overflow: hidden !important;}
            .goog-te-banner-frame{display: none !important;}
            body{top: 0px !important;}
        </style>

<!-- Google Element Translator -->
    <div id="google_language_drop">
        <div id="google_translate_element" class="-blank"></div>
            <script>
                function googleTranslateElementInit() {
                    new google.translate.TranslateElement({
                        includedLanguages: 'en,de,af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,et,tl,fi,fr,gl,ka,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,la,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi',
                        pageLanguage: '<?php echo $this->__('af') ?>',
                        gaTrack: true,
                        gaId: 'UA-12345678-1'
                    }, 'google_translate_element');
                }
            </script>
        <script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
    </div>
</div>

No comments:

Post a Comment