rodrigomtl Posted May 4, 2011 Share Posted May 4, 2011 Hello, At this moment i have 1 language working fine on my website with WHMCS. Now because the demand i need to add Second language i was trying to figure this out but is seem very complicated... Any one have pass thrue this, i dont' know where to start? Do i need to duplicate the folder TEMPLATE? I will appreciate any tips, link or howto page. Regards, 0 Quote Link to comment Share on other sites More sharing options...
rodrigomtl Posted May 4, 2011 Author Share Posted May 4, 2011 any one know if It will be possible that on header.tpl do a simple if statements to detect language? Example: if (language == french) { Show FRENCH MENU } else { Show SPANISH MENU } 0 Quote Link to comment Share on other sites More sharing options...
Alistair Posted May 4, 2011 Share Posted May 4, 2011 Did you know that WHMCS has a built-in language selector? 0 Quote Link to comment Share on other sites More sharing options...
rodrigomtl Posted May 4, 2011 Author Share Posted May 4, 2011 Did you know that WHMCS has a built-in language selector? Could you explain what you mean by language selector? Thank you 0 Quote Link to comment Share on other sites More sharing options...
Alistair Posted May 4, 2011 Share Posted May 4, 2011 Look at the bottom of the demo here: http://demo.whmcs.com/ - look just below where is says "Powered by WHMCS" You can allow your users to change the language - lucky for you, the WHMCS have already translated it for French and Spanish. Is this what you mean? 0 Quote Link to comment Share on other sites More sharing options...
rodrigomtl Posted May 4, 2011 Author Share Posted May 4, 2011 Yes Alistair, i know this but what if i want to customize the metatag description + chat now button and anything else that is on my header.tpl ? thank you in advance 0 Quote Link to comment Share on other sites More sharing options...
Alistair Posted May 4, 2011 Share Posted May 4, 2011 Yes Alistair, i know this but what if i want to customize the metatag description + chat now button and anything else that is on my header.tpl ? thank you in advance I see. You could try adding this information to your language file (look in the language folder) - although I am not 100% sure if it will work for everything in the section you want to edit. I might experiment with this myself later, if I get a chance. 0 Quote Link to comment Share on other sites More sharing options...
rodrigomtl Posted May 5, 2011 Author Share Posted May 5, 2011 Any one know if is possible to print the $LANG on header.tpl ? i am asking because this will probably be a solution for my problem. knowing the $LANG i will probably then just do a if statement to put the right content on the page. or is there a way to pass the $LANG variable in the URL? 0 Quote Link to comment Share on other sites More sharing options...
WebsiteIntegrations Posted May 6, 2011 Share Posted May 6, 2011 you can set the language in the url. 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...
gr2 Posted May 6, 2011 Share Posted May 6, 2011 depends really on what you want to do... example. for my terms and conditions page that is a long sheet of text i would rather use {if $language == English } text {elseif $language == Greek } text {elseif $language == OtherLang } {/if} than deal with the language files. this works well with multilingual images too. for simple menu labels i would probably add variables in the lang files. if your issue is adding active page states to menu items, try something to the nature of {if $smarty.server.PHP_SELF|strpos:'index.php'}<div id="mmenu11">{$LANG.mmenu1} {else}<div id="mmenu1"><a href="index.php">{$LANG.mmenu1}</a>{/if}</div> 0 Quote Link to comment Share on other sites More sharing options...
rodrigomtl Posted May 9, 2011 Author Share Posted May 9, 2011 depends really on what you want to do... example. for my terms and conditions page that is a long sheet of text i would rather use {if $language == English } text {elseif $language == Greek } text {elseif $language == OtherLang } {/if} This work like charm. You really help me. Thank you 0 Quote Link to comment Share on other sites More sharing options...
gr2 Posted May 9, 2011 Share Posted May 9, 2011 This work like charm.You really help me. Thank you Cheers, glad I could help. Your very welcome 0 Quote Link to comment Share on other sites More sharing options...
Payton Designs Posted May 10, 2011 Share Posted May 10, 2011 If you have two separate websites, you can link to the same WHMCS for both, but adding ?language={languagehere} at the end of any WHMCS URL will specify the appropriate language. 0 Quote Link to comment Share on other sites More sharing options...
Anders Posted July 6, 2011 Share Posted July 6, 2011 depends really on what you want to do... example. for my terms and conditions page that is a long sheet of text i would rather use {if $language == English } text {elseif $language == Greek } text {elseif $language == OtherLang } {/if} than deal with the language files. this works well with multilingual images too. for simple menu labels i would probably add variables in the lang files. if your issue is adding active page states to menu items, try something to the nature of {if $smarty.server.PHP_SELF|strpos:'index.php'}<div id="mmenu11">{$LANG.mmenu1} {else}<div id="mmenu1"><a href="index.php">{$LANG.mmenu1}</a>{/if}</div> hi i am intressded about this too but i ma abit novice so could you show some full code how it looks like please? as i want to do my html header in 2 languges. Warm regards Anders 0 Quote Link to comment Share on other sites More sharing options...
kjmiami23 Posted July 13, 2011 Share Posted July 13, 2011 Hi, All I am having a bit of a issue, what is the fastest way to update all the laguage packs like, if i edit something in the english txt file how can i update the others in there own language the quickest way possible please? Thanks 0 Quote Link to comment Share on other sites More sharing options...
denully Posted August 27, 2011 Share Posted August 27, 2011 depends really on what you want to do... example. for my terms and conditions page that is a long sheet of text i would rather use {if $language == English } text {elseif $language == Greek } text {elseif $language == OtherLang } {/if} than deal with the language files. this works well with multilingual images too. for simple menu labels i would probably add variables in the lang files. if your issue is adding active page states to menu items, try something to the nature of {if $smarty.server.PHP_SELF|strpos:'index.php'}<div id="mmenu11">{$LANG.mmenu1} {else}<div id="mmenu1"><a href="index.php">{$LANG.mmenu1}</a>{/if}</div> also just wanted to thank you that just solved my problem as well 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.