mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Merge pull request #158 from mariorodriguezlopez/main
Language in database
This commit is contained in:
@@ -47,12 +47,12 @@ $lang['en_us'] = array(
|
||||
// Device Page
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
'Navigation_Devices' => '<i class="fa fa-laptop"></i> Devices',
|
||||
'Navigation_Presence' => '<i class="fa fa-calendar"></i> Presence',
|
||||
'Navigation_Devices' => 'Devices',
|
||||
'Navigation_Presence' => 'Presence',
|
||||
'Navigation_Events' => 'Events',
|
||||
'Navigation_Maintenance' => 'Maintenance',
|
||||
'Navigation_Settings' => 'Settings',
|
||||
'Navigation_Network' => '<i class="fa fa-fw fa-network-wired"></i> Network',
|
||||
'Navigation_Network' => 'Network',
|
||||
'Navigation_HelpFAQ' => 'Help / FAQ',
|
||||
'Device_Title' => 'Devices',
|
||||
'Device_Shortcut_AllDevices' => 'All Devices',
|
||||
@@ -513,6 +513,8 @@ the arp-scan will take hours to complete instead of seconds.
|
||||
'REPORT_DASHBOARD_URL_description' => 'This URL is used as the base for generating links in the emails. Enter full URL starting with <code>http://</code> including the port number (no trailig slash <code>/</code>).',
|
||||
'DIG_GET_IP_ARG_name' => 'Internet IP discovery',
|
||||
'DIG_GET_IP_ARG_description' => 'Change the <a href="https://linux.die.net/man/1/dig" target="_blank">dig utility</a> arguments if you have issues resolving your Internet IP. Arguments are added at the end of the following command: <code>dig +short </code>.',
|
||||
'UI_LANG_name' => 'Select Language',
|
||||
'UI_LANG_description' => '',
|
||||
|
||||
//Email
|
||||
'Email_settings_group' => '<i class="fa fa-at"></i> Email',
|
||||
|
||||
@@ -46,7 +46,7 @@ $lang['es_es'] = array(
|
||||
'Navigation_Devices' => 'Dispositivos',
|
||||
'Navigation_Presence' => 'Historial',
|
||||
'Navigation_Events' => 'Eventos',
|
||||
'Navigation_Maintenance' => 'Cantenimiento',
|
||||
'Navigation_Maintenance' => 'Mantenimiento',
|
||||
'Navigation_Settings' => 'Configuración',
|
||||
'Navigation_Network' => 'Red',
|
||||
'Navigation_HelpFAQ' => 'Ayuda / FAQ',
|
||||
|
||||
@@ -6,18 +6,21 @@
|
||||
|
||||
$defaultLang = "en_us";
|
||||
|
||||
if(!isset($_COOKIE["language"])) {
|
||||
$pia_lang_selected = $defaultLang;
|
||||
} else {
|
||||
$pia_lang_selected = $_COOKIE["language"];
|
||||
global $db;
|
||||
|
||||
$result = $db->querySingle("SELECT Value FROM Settings WHERE Code_Name = 'UI_LANG'");
|
||||
switch($result){
|
||||
case 'Spanish': $pia_lang_selected = 'es_es'; break;
|
||||
case 'German': $pia_lang_selected = 'de_de'; break;
|
||||
default: $pia_lang_selected = 'en_us'; break;
|
||||
}
|
||||
|
||||
if (isset($pia_lang_selected) == FALSE or (strlen($pia_lang_selected) == 0)) {$pia_lang_selected = defaultLang;}
|
||||
if (isset($pia_lang_selected) == FALSE or (strlen($pia_lang_selected) == 0)) {$pia_lang_selected = $defaultLang;}
|
||||
|
||||
require '/home/pi/pialert/front/php/templates/skinUI.php';
|
||||
require 'en_us.php';
|
||||
require 'de_de.php';
|
||||
require 'es_es.php';
|
||||
require dirname(__FILE__).'/../skinUI.php';
|
||||
require dirname(__FILE__).'/en_us.php';
|
||||
require dirname(__FILE__).'/de_de.php';
|
||||
require dirname(__FILE__).'/es_es.php';
|
||||
|
||||
function lang($key)
|
||||
{
|
||||
@@ -45,4 +48,3 @@ function lang($key)
|
||||
|
||||
return $temp;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user