Jump to content

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,

Link to comment
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.

Link to comment
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?

Link to comment
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>

Link to comment
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

Link to comment
Share on other sites

  • 1 month later...
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

Link to comment
Share on other sites

  • 1 month later...
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 ;)

Link to comment
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