Question

I am trying to google it but I only get irrelevant results... How I can translate store view names in this language-switcher dropdown? I also tried "Translate Inline" but it doesnt give me more info. Check screenshot:

language-switcher-not-translated

Was it helpful?

Solution

Edited:

It's a long shot but remove your code and try to replace this:

echo $this->htmlEscape($_lang->getName())

With this:

echo $this->htmlEscape(__($_lang->getName())) 

Then try translate inline again.

OTHER TIPS

I know that isnt the best way but i added some if's in my languages.phtml file:

    <?php foreach ($this->getStores() as $_lang): ?>
    <?php echo $this->getCurrentStoreId() ?>
    <?php if ($this->getCurrentStoreId()== 2): ?>
        <?php if ($_lang->getName() == "Greek"): ?>
            <option value="<?php echo $_lang->getCurrentUrl() ?>" <?php if($lang_flag): ?> data-image="<?php echo $this->getSkinUrl('images/flags/'.$_lang->getCode().'.png'); ?>" <?php endif; ?>><?php echo "Ελληνικά" ?></option>
        <?php elseif ($_lang->getName() == "English"): ?>
            <option value="<?php echo $_lang->getCurrentUrl() ?>" <?php if($lang_flag): ?> data-image="<?php echo $this->getSkinUrl('images/flags/'.$_lang->getCode().'.png'); ?>" <?php endif; ?>><?php echo "Αγγλικά" ?></option>
        <?php endif; ?>
        <?php else: ?>
        <option value="<?php echo $_lang->getCurrentUrl() ?>" <?php if($lang_flag): ?> data-image="<?php echo $this->getSkinUrl('images/flags/'.$_lang->getCode().'.png'); ?>" <?php endif; ?> <?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
    <?php endif; ?>
<?php endforeach; ?>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top