mirror of
https://github.com/araxiaonline/WoWSimpleRegistration.git
synced 2026-06-13 03:12:27 -04:00
Multi-language support - Part 1.
This commit is contained in:
@@ -11,9 +11,12 @@ baseurl
|
||||
That's your website URL. Example: "https://DOMAIN.COM"
|
||||
page_title
|
||||
That's your website title. Example: "My WOW Private server!"
|
||||
language
|
||||
Website language (english)
|
||||
=====================================================================*/
|
||||
$config['baseurl'] = "http://localhost";
|
||||
$config['page_title'] = "Simple Register";
|
||||
$config['language'] = "english";
|
||||
/*===================================================================
|
||||
If you see a white screen or have an issue, you can enable it to see the errors.
|
||||
Note that after testing, be sure to disable this option.
|
||||
@@ -296,4 +299,4 @@ $config['realmlists'] = array( // Add your realmlist here
|
||||
|
||||
|
||||
|
||||
$config['script_version'] = '1.9.8';
|
||||
$config['script_version'] = '1.9.9';
|
||||
|
||||
@@ -340,4 +340,14 @@ function verifySRP6($user, $pass, $salt, $verifier)
|
||||
);
|
||||
$v = gmp_powm($g, $x, $N);
|
||||
return ($verifier === str_pad(gmp_export($v, 1, GMP_LSW_FIRST), 32, chr(0), STR_PAD_RIGHT));
|
||||
}
|
||||
|
||||
// Get language text
|
||||
function lang($val)
|
||||
{
|
||||
global $language;
|
||||
if (!empty($language[$val])) {
|
||||
return $language[$val];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
12
application/language/english.php
Normal file
12
application/language/english.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Amin Mahmoudi (MasterkinG)
|
||||
* @copyright Copyright (c) 2019 - 2022, MsaterkinG32 Team, Inc. (https://masterking32.com)
|
||||
* @link https://masterking32.com
|
||||
* @Description : It's not masterking32 framework !
|
||||
**/
|
||||
|
||||
$language['lang'] = 'english';
|
||||
$language['custom_css'] = '';
|
||||
|
||||
|
||||
1
application/language/index.html
Normal file
1
application/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<a href="https://masterking32.com">MasterkinG32.CoM</a>
|
||||
@@ -34,14 +34,20 @@ require_once app_path . 'include/database.php';
|
||||
require_once app_path . 'include/user.php';
|
||||
require_once app_path . 'include/vote.php';
|
||||
require_once app_path . 'include/status.php';
|
||||
|
||||
if (!preg_match('/^([a-z]+)$/i', get_config('language')) || !file_exists(app_path . 'language/' . get_config('language') . '.php')) {
|
||||
die('Language is not valid!');
|
||||
}
|
||||
|
||||
require_once app_path . 'language/' . get_config('language') . '.php';
|
||||
|
||||
$antiXss = new AntiXSS();
|
||||
if (!empty(get_config('script_version'))) {
|
||||
/* @TODO Add online version check! */
|
||||
if(version_compare(get_config('script_version'), '1.9.8', '<') )
|
||||
{
|
||||
echo 'Use last version of config.php file.';
|
||||
exit();
|
||||
}
|
||||
if (version_compare(get_config('script_version'), '1.9.9', '<')) {
|
||||
echo 'Use last version of config.php file.';
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
echo 'Use last version of config.php file.';
|
||||
exit();
|
||||
|
||||
Reference in New Issue
Block a user