preliminary test to see if store view names are displayed on the lang…#5
Open
imino123 wants to merge 1 commit intoiMi-digital:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've edited ViewModel/StoreSwitchModel.php file to test if I could get store view names displayed on the language switcher rather than the language/country code.
I changed the code within an existing function:
line 192: public function getStoreSwitchLabel(StoreInterface $store): string(by editing this function, it means the loss of the ability to view the Country Name with Country Character Code together on the language switcher. However, this is just a preliminary trial. I intend on making a separate PHP function to display Store View Names, so all existing functions will be restored)
I've tested this on Magento 2.3.5 and the 'store view names' are all displaying correctly on the language switcher.
I am new to Magento development and unsure whether the code that I used is the best way to achieve displaying all the store names.
It now requires a separate PHP function within ViewModel/StoreSwitchModel.php and an option within the Magento admin dashboard to allow a user to choose and display "Store View Names".
I will try and edit the following files to achieve this:
ViewModel/StoreSwitchModel.php
etc/adminhtml/system.xml
etc/config.xml
view/frontend/templates/switch/languages.phtml