I wish to translate store language switcher label dropdown from english to simplified chinese. PFA for thes same.enter image description here


copy file app/design/frontend/base/default/template/page/switch/languages.phtml into your theme

add below code

 echo $this->__(<Text to translate>);

you want to translate




Your final code

<?php if(count($this->getStores())>1): ?>
<div class="form-language">
    <label for="select-language"><?php echo $this->__('Your Language:') ?></label>
    <select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="window.location.href=this.value">
    <?php foreach ($this->getStores() as $_lang): ?>
        <?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?>
        <option value="<?php echo $_lang->getCurrentUrl() ?>"<?php echo $_selected ?>><?php echo $this->__($this->escapeHtml($_lang->getName())) ?></option>
    <?php endforeach; ?>
<?php endif; ?>

Add entry in csv file for translation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.