Skip to content

preliminary test to see if store view names are displayed on the lang…#5

Open
imino123 wants to merge 1 commit intoiMi-digital:masterfrom
imino123:test-to-see-if-store-view-names-are-displayed
Open

preliminary test to see if store view names are displayed on the lang…#5
imino123 wants to merge 1 commit intoiMi-digital:masterfrom
imino123:test-to-see-if-store-view-names-are-displayed

Conversation

@imino123
Copy link
Copy Markdown

@imino123 imino123 commented Sep 12, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant