ghostq Posted July 9, 2010 Share Posted July 9, 2010 how to hide a langue from the language module in front office but keep it in back office? thanks Link to comment Share on other sites More sharing options...
rocky Posted July 10, 2010 Share Posted July 10, 2010 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 More sharing options...
ghostq Posted July 10, 2010 Author Share Posted July 10, 2010 great thanks i will try it. your website can visit from china now, it is very cool Link to comment Share on other sites More sharing options...
ghostq Posted July 10, 2010 Author Share Posted July 10, 2010 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 More sharing options...
rocky Posted July 10, 2010 Share Posted July 10, 2010 I just tested the code on my test site and it worked fine. What's the error message you get when you edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on'? Link to comment Share on other sites More sharing options...
ghostq Posted July 10, 2010 Author Share Posted July 10, 2010 {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 More sharing options...
rocky Posted July 10, 2010 Share Posted July 10, 2010 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 More sharing options...
ghostq Posted July 10, 2010 Author Share Posted July 10, 2010 oh i see , i will try it again thanks Link to comment Share on other sites More sharing options...
ghostq Posted July 10, 2010 Author Share Posted July 10, 2010 it works man . i need to delect the lol Link to comment Share on other sites More sharing options...
rocky Posted July 10, 2010 Share Posted July 10, 2010 If your issue is resolved, please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now