Jump to content
rodrigomtl

2 languages in my website how to?

Recommended Posts

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,

Share this post


Link to post
Share on other sites

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

}

Share this post


Link to post
Share on other sites
Did you know that WHMCS has a built-in language selector?

 

Could you explain what you mean by language selector?

 

Thank you

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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>

Share this post


Link to post
Share on other sites
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. :D

You really help me.

 

Thank you

Share this post


Link to post
Share on other sites
This work like charm.

You really help me.

 

Thank you

 

Cheers, glad I could help.

 

Your very welcome

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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 ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated