I have a Google translate module installed on our site and want to add a drop down, to select the language.
the place i would like to add it would be in the settings tab.
As in this screenshot.
http://prntscr.com/nilbpa
I can add the following to a CMS page/block to get the drop down.
{{block class=”ZealousWeb\\GTranslator\\Block\\Select” name=”translator_block”
template=”ZealousWeb_GTranslator::select.phtml”}}
or this to a layout page/block.
<block class=”ZealousWeb\GTranslator\Block\Select” name=”gtranslator_select”
template=”ZealousWeb_GTranslator::select.phtml” />
How would add the drop down to the setings tab in the top of the page.
2 answers
Hi there,
As explained to you in this ticket, kindly accept our apology for the unexpected delay in following up your ticket. We will get back to you once we’re back to work on next May 2.
Thanks for your patience.
Sincerely,
Ubertheme team
Hi There,
I have a Google translate module installed on our site and want to add a drop down, to select the language.
the place i would like to add it would be in the settings tab.
As in this screenshot.
http://prntscr.com/nilbpa
This will need pretty much change. You can follow steps below to replace the Translate Block you mentioned.
Step 1: Open the file: app\design\frontend\Ubertheme\megamall\Magento_Theme\layout\default.xml, navigate to the line 31 and add the code below it:
<block class=”ZealousWeb\GTranslator\Block\Select” name=”gtranslator_select” template=”ZealousWeb_GTranslator::select.phtml” />
In the same file, you add this code right after the line 39:
<move element=”gtranslator_select” destination=”top.settings” after=”-“/>
(The new code will be similar to this screenshot: https://www.dropbox.com/s/kz1ciyy5a7mpsd9/2019-05-02_09-36-34.png?dl=0 )
Step 2: Open the file: app\design\frontend\Ubertheme\megamall\Magento_Theme\templates\html\quicksettings.phtml, replace the lines from 23 -> 32 with the code:
<?php echo $block->getChildHtml(‘gtranslator_select’); ?>
(Similar to this screenshot: https://www.dropbox.com/s/b30mrq0g7y6ukm4/2019-05-02_09-35-24.png?dl=0)
Then, clean Magento system cache.
Best Regards,
Ziven.