0
getStores()) > 1): ?>
<?php $id = $block->getIdModifier() ? '-' . $block->getIdModifier() : '' ?>
<div class="switcher language switcher-language" data-ui-id="language-switcher"
     id="switcher-language<?php /* @escapeNotVerified */
     echo $id ?>">
    <strong class="label switcher-label"><span><?php /* @escapeNotVerified */
            echo __('Language') ?></span></strong>
    <div class="switcher-content">
        <div class="action-switcher" id="switcher-language-trigger<?php /* @escapeNotVerified */
        echo $id ?>">
            <div class="heading-switcher view-<?php echo $block->escapeHtml($block->getCurrentStoreCode()) ?>"
                 style="background-repeat: no-repeat; background-image:url('<?php /* @escapeNotVerified */
                 echo $block->getViewFileUrl('images/flags/flag_' . $block->getCurrentStoreCode() . '.svg') ?>');">
                <span><?php echo $block->escapeHtml($block->getStoreName()) ?></span>
            </div>
        </div>

        <div class="dropdown-switcher">
            <ul class="list-item">
                <?php foreach ($block->getStores() as $_lang): ?>
                    <?php if ($_lang->getId() != $block->getCurrentStoreId()): ?>
                        <li class="view-<?php echo $block->escapeHtml($_lang->getCode()); ?> switcher-option">
                            <a href="#" data-post='<?php /* @escapeNotVerified */
                            echo $block->getTargetStorePostData($_lang); ?>'>
                            <span style="background-repeat: no-repeat; background-image:url('<?php /* @escapeNotVerified */
                            echo $block->getViewFileUrl('images/flags/flag_' . $_lang->getCode() . '.svg') ?>');"><?php echo $block->escapeHtml($_lang->getName()) ?></span>
                            </a>
                        </li>
                    <?php endif; ?>
                <?php endforeach; ?>
            </ul>
        </div>

    </div>
</div>
2
  • What csv? Where is it located? (To me) it's pretty unclear what you are trying to accomplish and what were the steps you took so far. Jan 10, 2022 at 22:50
  • my apologies...when you’re on the English store it will appears English/French but when you are on the French store it will appear Anglais/Francais. I have "English","Anglais" and "French","Francais" inside the fr_FR.csv. but it still didn't get translate. Please see this picture prnt.sc/25uwgix
    – user97995
    Jan 11, 2022 at 5:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.