Jump to content

$language integration


d3m0n

Recommended Posts

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

Link to comment
Share on other sites

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

 

 

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
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