Skip to end of metadata
Go to start of metadata

Move Select Language form

 ‘Select Language’ form can be moved to another place of the page if needed.


In the header.tpl (Edit templates -> menu -> header.tpl) you need to find the following part of the code:

<form id="langSwitcherForm" method="get" action="">
<select name="lang" onchange="location.href='{$GLOBALS.site_url}{$url}?lang='+this.value+'&amp;{$params}'" style="width: 200px;">
{foreach from=$GLOBALS.languages item=language}
<option value="{$language.id}"{if $language.id == $GLOBALS.current_language} selected="selected"{/if}>{$language.caption}</option>
{/foreach}
</select>
</form>


Then you need to cut this code and move it to the needed place of the template code.

Note: it is not necessarily to keep the above-mentioned codes in the header.tpl - they can be moved to any other template if wanted.

Remove / hide Select Language form

If there is only one language used in your system, then you can hide or remove the Select Language form the front-end.

To completely remove the Select Language form you simply need to delete its code from the template:

<form id="langSwitcherForm" method="get" action="">
<select name="lang" onchange="location.href='{$GLOBALS.site_url}{$url}?lang='+this.value+'&amp;{$params}'" style="width: 200px;">
{foreach from=$GLOBALS.languages item=language}
<option value="{$language.id}"{if $language.id == $GLOBALS.current_language} selected="selected"{/if}>{$language.caption}</option>
{/foreach}
</select>
</form>

 

And to temporarily hide it and make not visible for users you can comment it out the following way:

{*

code

*}

 Note: to make the Select Language form visible again you will just need to delete the {* and *} symbols.
  • No labels