Advice on multi language system?

Started on the old forum in April 2010 · view the original in the archive · old links redirect here

2 replies · 343 views · started 16 years ago · 1 min read

3 participants
Malka1 Developer · 169 posts #1

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

bOrN2pwn Developer · 230 posts #3

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

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

class Counter {
public:
  void Count();
  int  ReadDisplay();
private:
  int  CurrentCount;
};

External image (may be gone) External image (may be gone) External image (may be gone)

Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close