Hi
I'd like to make a multilingual website and add a language switch next to the search icon. How to do it?
Site: https://dfk.stolarzowice.info
Template: GK Academy
Regards, Joachim
GK Academy multilingual site
Hi Joachim,
You can customize a bit here:
Go to file: /templates/gk_academy/layouts/default.php
Under the code which renders the search module, put the code for the language position, it will look like this:
<?php if($this->API->modules('search')) : ?> <!-- #gkSearch -->
<div id="gkSearch">
<a href="<?php echo JRoute::_('index.php?option=com_search'); ?>">
<span class="ion-search"></span><span class="element-invisible">gkSearch</span>
</a>
</div>
<?php endif; ?>
<?php if($this->API->modules('lang')) : ?> <!-- #gkLang -->
<div id="gkLang">
<jdoc:include type="modules" name="lang" style="xhtml" />
</div>
<?php endif; ?>
then go to Backend >> Extensions >> Modules >> assign language switcher module to 'lang' position
You may also need to customize style for this language module.
- Edited
Hi joachimm
In case that you want to put under the logo, in the same file, look for this snippet of code:
<div class="gkLogoWrap">
<?php $this->layout->loadBlock('logo'); ?>
</div>
change it to:
<div class="gkLogoWrap">
<?php $this->layout->loadBlock('logo'); ?>
<jdoc:include type="modules" name="lang" style="xhtml" />
</div>
This will help to load lang position under the logo.
Regards
saguaros locked the discussion.