Advice on multi language system?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Advice on multi language system?

    Can anyjone please help me with this...

    I have created lang file, all works fine, but i want to know how to change this
    "include 'lang/eng/index.php';"
    to variable value, so i can make multi language!

    Hope of understanding

    #2
    The what???

    Comment


      #3
      You mean like this try this code heres an example....
      Hope this helps you

      PHP Code:

      <?php

      $stitle 
      "my site";

      if(
      $lang[0]=="1"){
      ///////ENGLISH//////////////////////////////////////////////////////
      ///////INDEX.PHP////////////////////////////////////////////////////

      ///////bcon
      $lang1 "ERROR! cannot connect to database";
      $lang2 "This error happens usually when backing up the database, please be patient, The site will be up any minute";
      $lang3 "THANK YOU VERY MUCH";

      ///////isshield
      $lang4 "This IP address is blocked";
      $lang5 "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over";
      $lang6 "Time to unblock the IP:";
      $lang7 "UserName:";
      $lang8 "Password:";
      $lang9 "LOGIN";

      ///////islogged
      $lang10 "You are not logged in";
      $lang11 "Or Your session has been expired";
      $lang12 "Login";

      ///////isbanned
      $lang13 "You are <b>Banned</b>";
      $lang14 "Time to finish your penalty:";
      $lang15 "Ban Reason:";

      ///////main
      $lang16 "you night owl!";
      $lang17 "Good morning ";
      $lang18 "Enjoy your lunch ";
      $lang19 "Good afternoon ";
      $lang20 "Good Evening ";
      $lang21 "Inbox";

      }else

      if(
      $lang[0]=="2"){
      ///////AFRIKAANS////////////////////////////////////////////////////


      ///////INDEX.PHP////////////////////////////////////////////////////
      ///////bcon
      $lang1 "ERROR! Kan nie konekteer nie";
      $lang2 "Die fout gebeur soms waneer die datbasis geberg word";
      $lang3 "Dankie baie";

      ///////isshield
      $lang4 "Die IP is geblock";
      $lang5 "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over";
      $lang6 "Time to unblock the IP:";
      $lang7 "UserName:";
      $lang8 "Password:";
      $lang9 "LOGIN";

      ///////islogged
      $lang10 "You are not logged in";
      $lang11 "Or Your session has been expired";
      $lang12 "Login";

      ///////isbanned
      $lang13 "You are <b>Banned</b>";
      $lang14 "Time to finish your penalty:";
      $lang15 "Ban Reason:";

      ///////main
      $lang16 "jou nag uil!";
      $lang17 "Goeie môre ";
      $lang18 "Enjoy your lunch ";
      $lang19 "Goeie middag ";
      $lang20 "Goeienaand ";
      $lang21 "Inbox";
      $lang21a "Nuwe Boodskap";
      $lang21b "Nuwe Boodskappe";

      }
      ?>
      BakGat
      Code:
      class Counter {
      public:
        void Count();
        int  ReadDisplay();
      private:
        int  CurrentCount;
      };








      Back up my hard drive? How do I put it in reverse?
      My Community
      BakGat
      sigpic

      Comment

      Working...
      X