Jump to content

how to set language in whmcs in custom language script

da capo

Recommended Posts

Hey guys


I've got my page with a language script, so if they go to vt16.com it sets to english language, .se swedish etc.

But which variable or session do i need to change, in order to change the language for WHMCs too?


I've read a bit on the forum and tried this but it doesn't work:


if($language == "en") $_SESSION["Language"] = "English";
if($language == "da") $_SESSION["Language"] = "Danish";
if($language == "se") $_SESSION["Language"] = "Swedish";
if($language == "no") $_SESSION["Language"] = "Norwegian";


i could update the users language in the database too, but if they aren't logged in this wouldn't work.

Link to comment
Share on other sites

  • 9 months later...
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
if (navigator.appName == 'Netscape')
var language = navigator.language;
var language = navigator.browserLanguage;
if (language.indexOf('en') > -1) document.location.href = 'cart.php?language=English';
else if (language.indexOf('nl') > -1) document.location.href = 'cart.php?language=Nederlands';
document.location.href = 'cart.php?language=English';
// End -->


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.

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