문제

how can I change "AED - United Arab Emirates Dirham" to "AED - UAE Dirham" in Luma currency switcher?

I created en_US.csv file in my custom theme > i18n folder and added "united Arab Emirates" in the 1st column and "UAE" in the 2nd column. But still not working.

enter image description here

도움이 되었습니까?

해결책

Override currency.phtml file in your theme

app/design/frontend/{vendore}/{theme}/Magento_Directory/templates/currency.phtml

Change line number 35

<?= $block->escapeHtml($_code) ?> - <?= $block->escapeHtml($_name) ?>

to

<?= __($block->escapeHtml($_code)) ?> - <?= __($block->escapeHtml($_name)) ?>

Create app/design/frontend/{vendore}/{theme}/i18n/en_US.csv file and write below code

"United Arab Emirates Dirham","UAE Dirham"

Change line number 28

<?= $block->escapeHtml($currentCurrencyCode) ?> - <?= @$block->escapeHtml($currencies[$currentCurrencyCode]) ?>

to

<?= __($block->escapeHtml($currentCurrencyCode)) ?> - <?= __(@$block->escapeHtml($currencies[$currentCurrencyCode])) ?>

I hope it's useful for you.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top