d3m0n Posted September 14, 2008 Share Posted September 14, 2008 Hello i am new here, so sorry for spam if it's a well known topic. i am integrating whm with one cms i am currently using , trying to redirect back users from cms with current language eg {if $language eq "English"}http://mydomain.com/en/ {elseif language eq "Spanish"}http://mydomain.com/es/ {else}http://mydomain.com/en/{/if} does something like this exist ? or is there another way to do this? thx in advance Demon 0 Quote Link to comment Share on other sites More sharing options...
SindreM Posted September 14, 2008 Share Posted September 14, 2008 Just use "clientarea.php?language=$language". 0 Quote Link to comment Share on other sites More sharing options...
d3m0n Posted September 14, 2008 Author Share Posted September 14, 2008 hmm thx for the tip SinderM but i need some sort of smarty syntax eg {if $language eq "English"}Hello {/if} 0 Quote Link to comment Share on other sites More sharing options...
d3m0n Posted September 16, 2008 Author Share Posted September 16, 2008 any body? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted September 16, 2008 Share Posted September 16, 2008 Without knowing what CMS your using and how that CMS assigns its language file or whether that CMS uses Smarty templates or php From your CMS file you should know what language your in so use the link to WHMCS like suggested to you before http://yourdomain.com/whmcs_dir/clientarea.php?language=Spanish What you sugested before can't be done because only 1 language file is loaded (not all of them) therefore you have to use the ?language= at the end of the URL. For more see http://wiki.whmcs.com/Linking_to_WHMCS#Setting_the_Language.2FTemplate_via_the_URL 0 Quote Link to comment Share on other sites More sharing options...
d3m0n Posted September 17, 2008 Author Share Posted September 17, 2008 Thx for suggestion Sparky but u did't get my point i am not talking bout cms right now , but about WHMCS ability is there a way to do this sort of thing in WHMCS {if $language eq "English"}Hello {/if} just want to say extra Hello to all people that will switch to English on WHMCS is this possible? if yes what is correct syntax thx 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted September 17, 2008 Share Posted September 17, 2008 is there a way to do this sort of thing in WHMCS {if $language eq "English"}Hello {/if} just want to say extra Hello to all people that will switch to English on WHMCS In each of your language files (in the lang directory) add this line changing the last part (in bold) to the language name. $_LANG["languagename"] = "English";Then you can use {if $languagename eq "English"}{php} header ('Location: http://mydomain.com/en/');{/php} {elseif language eq "Spanish"}{php} header ('Location: http://mydomain.com/es/');{/php} {else}{php} header ('Location: http://mydomain.com/en/');{/php}{/if} till your hearts content.As you said in your first post you are trying to redirect!! Also as I said in my previous post only 1 language file is loaded (not all of them)Hope it helped a bit 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.