英文:
Translate store view name based on current store magento
问题
我有一个在Magento 2中的多语言商店,我想根据当前所选语言来翻译商店视图的名称。
例如,如果我选择英语(en),我希望在语言下拉菜单中显示:English/ French。
但如果我选择法语(fr),我希望显示:Anglais/ Français。
这个想法可行吗?
英文:
I have a multi-language store in magento 2, and I want to translate the name of the store views depending on which language I currently am on.
For example if I am on en in the language dropdown I want to show: English/ French.
But if I am on fr in the language dropdown I want to show: Anglais/ Francais.
Is this think possible?
答案1
得分: 1
我找到了一个解决方案(对于那些想要的人),你可以在CSV文件中单独为每种语言编辑商店视图的名称,因此当你在英语商店上时,它将显示为English/French,但当你在法语商店上时,它将显示为Anglais/Francais。
英文:
I found a solution (for those who want this), you can edit the name of the storeview in the csv file each language indivually, so when you're on the english store it will appear English/French but when you are on the french store it will appear Anglais/Francais
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论