how to have a lang. drop down!

Discussion in 'User interface' started by b4uindia, May 3, 2007.

  1. b4uindia

    b4uindia Paid Customer

    How we can have lang. drop down box in the footer where a user comes and choose his/her preferred lang. and the site goes to converted to all according to the selected lang. file

    please help me asap
  2. John Turner

    John Turner New Member

    Hi b4uindia,

    Here modification for you.
    Open '../templates/{YOUR TEMPLATE}/header.tpl'
    find following code
    		{foreach from=$languages item=language name=select_lang}
    		<li {if $smarty.foreach.select_lang.last}style="border-right: none;"{/if}>
    			{if $language.lang eq $config.lang}
    				&nbsp;<a href="{$smarty.server.REQUEST_URI|add_url_param:'language':$language.lang}">{$language.lang}</a></li>
    replace with following code
    	<form method="get" action="{$smarty.server.REQUEST_URI}">
    		Choose language:
    		<select name="language" class="what" onChange="this.form.submit()">
    		{foreach from=$languages item=language}
    		<option value="{$language.lang}" {if $language.lang eq $config.lang}selected{/if}>{$language.lang}</option>
    *** save and close it.

    It might helps.

Share This Page