Hi all.

I'm using phpnuke6.5 for my site and support two language namely English and Chinese

My modules and blocks can normally show the correctly language of user select

In a small module I make, I am sending user to other web program by using user name and passward of the nuke_user table

In additional, I want to send them to different url with a if statment
eg
if (language-english.php){
url1
}else}
url2
}

I am not sure how where the COLOR=red [/COLOR] should put.

Please advise how this can be done

Thanks in advance for the time

Regards,

    have the current language selected in $lang

    use

    if($lang=="someweirdlanguage1")
    header("Location: url1");
    else
    header("Location: url2");

      Thanks for the tips,

      However it still doesn't work

      If ($lang=="/language/lang-english.php"){
      $url1 = "Location: [url]http://osward.net/netjuke/login.php?netjuke_login=[/url]" .$userinfo[user_email]. "&netjuke_password=" .$userinfo[user_password2]. "";
      header ($url1);
      } else {
      $url2 = "Location: [url]http://osward.net/netjuke_Big5/login.php?netjuke_login=[/url]" .$userinfo[user_email]. "&netjuke_password=" .$userinfo[user_password2]. "";
      header ($url2);
      }
      

      With the above, no matter which language I choose from the phpnuke index page, I was sent to url2

      Please advise what might be the problem

      Thanks in advance for the time

      Regards,

        Is $lang really supposed to be '/language/lang-english.php'? Not having any idea about how PHP-Nuke stores users' language preferences I don't know, maybe it is.

          I've got it

          What I echo $lang it return english

          and

          If ($lang=="english"){
          $url1 = "Location: [url]http://osward.net/netjuke/login.php?netjuke_login=[/url]" .$userinfo[user_email]. "&netjuke_password=" .$userinfo[user_password2]. "";
          header ($url1);
          } else {
          $url2 = "Location: [url]http://osward.net/netjuke_Big5/login.php?netjuke_login=[/url]" .$userinfo[user_email]. "&netjuke_password=" .$userinfo[user_password2]. "";
          header ($url2);
          }
          

          works now

          Thanks again for your help

          Regards,

            Write a Reply...