| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 31 online users. » 0 Member(s) | 29 Guest(s) Bing, Yandex
|
| Latest Threads |
Last Chaos Server Sale
Forum: The Black Market (Buy, Sell, Trade)
Last Post: XWrongX2
01-26-2026, 11:07 PM
» Replies: 3
» Views: 618
|
All in One Exporter
Forum: Tools
Last Post: Kain88
01-25-2026, 07:04 AM
» Replies: 4
» Views: 441
|
HELP! ReZasCashServer It ...
Forum: Ep4 Support
Last Post: Kain88
01-24-2026, 03:24 PM
» Replies: 2
» Views: 171
|
Hi, does anyone know the ...
Forum: Help
Last Post: Desarija
01-21-2026, 11:29 AM
» Replies: 1
» Views: 120
|
LastChaos Nemesis
Forum: Server Advertising
Last Post: Desarija
01-20-2026, 04:06 PM
» Replies: 3
» Views: 242
|
Looking for EP4 Guidance
Forum: General Discussion
Last Post: xHypnosiaa
01-19-2026, 08:33 AM
» Replies: 1
» Views: 174
|
We're in need of creative...
Forum: Project Recruitment
Last Post: RGT
01-16-2026, 12:48 AM
» Replies: 0
» Views: 123
|
Last Chaos build deployme...
Forum: Ep4 Guides
Last Post: xHypnosiaa
01-08-2026, 11:14 AM
» Replies: 0
» Views: 82
|
Last Chaos global server ...
Forum: Ep4 Guides
Last Post: xHypnosiaa
01-07-2026, 07:01 PM
» Replies: 0
» Views: 38
|
EP-2/EP-3 Mixed files
Forum: Archived General Server Releases
Last Post: TeKnodE
01-06-2026, 09:53 PM
» Replies: 1
» Views: 300
|
|
|
| Adding Text Model to LC |
|
Posted by: bignoob77 - 02-08-2015, 07:09 PM - Forum: General Guides
- No Replies
|
 |
This is my first tutorial i have ever made . I know there are easier ways to do some of the things i did in the video
but i was trying to keep it simple. B)
|
|
|
| Website Language System (dont matter what you have) |
|
Posted by: FCV2005 - 02-07-2015, 03:52 AM - Forum: General Guides
- Replies (1)
|
 |
1 . Create a new folder Languages in you www folder or you can use other folder name !
2. Create translator.php , lang.en.php, lang.fr.php, lang.de.php, etc.
#translator.php
<?php
session_start();
header('Cache-control: private'); // IE 6 FIX
if(isSet($_GET['lang']))
{
$lang = $_GET['lang'];
$_SESSION['lang'] = $lang;
setcookie("lang", $lang, time() + (3600 * 24 * 30));
}
else if(isSet($_SESSION['lang']))
{
$lang = $_SESSION['lang'];
}
else if(isSet($_COOKIE['lang']))
{
$lang = $_COOKIE['lang'];
}
else
{
$lang = 'en';
}
switch ($lang) {
case 'en':
$lang_file = 'lang.en.php';
break;
case 'fr':
$lang_file = 'lang.fr.php';
break;
case 'de':
$lang_file = 'lang.de.php';
break;
default:
$lang_file = 'lang.en.php';
}
include_once 'languages/'.$lang_file;
?>
#lang.en.php
<?php
/*
-----------------
Language: EN
-----------------
*/
$lang = array();
// Side Bar Informations
$lang['SIDE_ACCOUNTS'] = 'Total Accounts Registered';
$lang['SIDE_CHARACTERS'] = 'Total Characters Created';
$lang['SIDE_ONLINE'] = 'Online Players';
$lang['SIDE_ONLINE_STAFF'] = 'Online Staff Members';
// Menu
$lang['MENU_HOME'] = 'Home';
$lang['MENU_NEWS'] = 'News';
$lang['MENU_DOWNLOADS'] = 'Downloads';
$lang['MENU_LANG'] = 'Language';
// Texts
$lang['WELCOME'] = 'Welcome';
$lang['BALANCE'] = 'Cash Balance';
$lang['ACCOUNT'] = 'Account';
$lang['DONATE'] = 'Donate';
$lang['SPECIAL_RENAME'] = 'Special Rename';
$lang['VOTE'] = 'Vote';
$lang['LOGOUT'] = 'Logout';
$lang['LOGIN'] = 'Login';
?>
#lang.en.php (must be same as lang.en.php , but dont't forget to change lang texts ! )
<?php
/*
-----------------
Language: FR
-----------------
*/
$lang = array();
// Side Bar Informations
$lang['SIDE_ACCOUNTS'] = 'bla bla bla bla';
$lang['SIDE_CHARACTERS'] = 'bla bla bla';
$lang['SIDE_ONLINE'] = 'Bla bla bla france';
$lang['SIDE_ONLINE_STAFF'] = 'france translate';
// Menu
$lang['MENU_HOME'] = 'Home';
$lang['MENU_NEWS'] = 'News';
$lang['MENU_DOWNLOADS'] = 'Downloads';
$lang['MENU_LANG'] = 'Language';
// Texts
$lang['WELCOME'] = 'Welcome';
$lang['BALANCE'] = 'Cash Balance';
$lang['ACCOUNT'] = 'Account';
$lang['DONATE'] = 'Donate';
$lang['SPECIAL_RENAME'] = 'Special Rename';
$lang['VOTE'] = 'Vote';
$lang['LOGOUT'] = 'Logout';
$lang['LOGIN'] = 'Login';
?>
Now you need to open you website (index.php) and add those line !
include_once('languages/common.php');
if you already have started session , remove it !
this is session_start();
and now to replace texts in you index.php just do
<?php echo $lang['MENU_HOME']; ?>
if you want to add inside of scripts
{$lang['MENU_HOME']}
@have fun !
and link for changing lang is
[hide]index.php?lang=de[/hide]
|
|
|
| Questions |
|
Posted by: Fyxon - 02-06-2015, 10:48 PM - Forum: General Discussion
- Replies (5)
|
 |
Hi all.
I was checking old posts for how make LC server for myself and test things,learn, add new things, change things, etc and later maybe open it for public... but all/almost old's post's with link's, tutorials and images don't work, videos from youtube are deleted, etc...
Maybe anyone can post here any link of any guide... that would be good...
Regards.
|
|
|
|