forked from kevinowino869/mitrobill
Auto translate Fix
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
|
||||
@ -148,20 +147,14 @@ function _notify($msg, $type = 'e')
|
||||
if (empty($config['language'])) {
|
||||
$config['language'] = 'english';
|
||||
}
|
||||
|
||||
if (empty($_SESSION['Lang'])) {
|
||||
$lan_file = File::pathFixer('system/lan/' . $config['language'] . '.json');
|
||||
if (file_exists($lan_file)) {
|
||||
$_L = json_decode(file_get_contents($lan_file), true);
|
||||
} else {
|
||||
$_L['nux_created_by'] = 'Auto Generated by iBNuX Script';
|
||||
$_SESSION['Lang'] = $_L;
|
||||
if (file_exists($lan_file)) {
|
||||
file_put_contents(File::pathFixer('system/lan/' . $config['language'] . '/common.lan.json'), json_encode($_L));
|
||||
}
|
||||
}
|
||||
$lan_file = File::pathFixer('system/lan/' . $config['language'] . '.json');
|
||||
if (file_exists($lan_file)) {
|
||||
$_L = json_decode(file_get_contents($lan_file), true);
|
||||
$_SESSION['Lang'] = $_L;
|
||||
} else {
|
||||
$_L = $_SESSION['Lang'];
|
||||
$_L['author'] = 'Auto Generated by iBNuX Script';
|
||||
$_SESSION['Lang'] = $_L;
|
||||
file_put_contents($lan_file, json_encode($_L));
|
||||
}
|
||||
|
||||
$ui = new Smarty();
|
||||
|
Reference in New Issue
Block a user