Jump to content

[solved ]how to hide a langue from the language module in front office but keep it in back office?


Recommended Posts

Add code like the following after the {foreach} in modules/blocklanguages/blocklanguages.tpl:

{if $language.iso_code != 'en'}



and the following before the {/foreach}:

{/if}



This code will hide the English language. Change 'en' to the iso code of the language you want hidden.

Link to comment
Share on other sites

Add code like the following after the {foreach} in modules/blocklanguages/blocklanguages.tpl:

{if $language.iso_code != 'en'}



and the following before the {/foreach}:

{/if}



This code will hide the English language. Change 'en' to the iso code of the language you want hidden.



Hi Rocky
i tried it but the front office can't visit it after i add the code you given to me to the file.
Link to comment
Share on other sites

{foreach from=$languages key=k item=language name="languages"}{if $language.iso_code != 'cn'}{/if} {if $language.iso_code != $lang_iso}{/if} {if $language.iso_code != $lang_iso} {/foreach} 

i add it like this, i don't know the codes so i am not sure it is added correctly

Link to comment
Share on other sites

It should be like this:

{foreach from=$languages key=k item=language name="languages"}
   {if $language.iso_code != 'cn'}

       {if $language.iso_code != $lang_iso}<a href="{$link->getLanguageLink($language.id_lang, $language.name)}" title="{$language.name}">{/if}
           <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
       {if $language.iso_code != $lang_iso}{/if}

   {/if}
{/foreach}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...