From 3ff03dc4f0a72432b34c00da620272cf011e4ddd Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 29 Jul 2021 14:17:20 +1000 Subject: Publishing h-node.org code. - this is the h-node.org code, except - removed a js file (3x copies at three different locations) without license / copyright headers - /Js/linkToForm.js - /Public/Js/linkToForm.js - /admin/Public/Js/linkToForm.js - removed config files containing credentials - /Application/Include/params.php - /Config/Config.php - /admin/Application/Include/params.php - /admin/Config/Config.php - added license and copyright header to one php file - /admin/Library/ErrorReporting.php (almost identical to /Library/ErrorReporting.php which has the headers) --- h-source/admin/Application/Include/languages.php | 192 +++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 h-source/admin/Application/Include/languages.php (limited to 'h-source/admin/Application/Include/languages.php') diff --git a/h-source/admin/Application/Include/languages.php b/h-source/admin/Application/Include/languages.php new file mode 100644 index 0000000..6262c3e --- /dev/null +++ b/h-source/admin/Application/Include/languages.php @@ -0,0 +1,192 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang +{ + public static $allowed = array('en','es','it'); + public static $current = 'en'; + + public static $complete = array( + 'en' => 'gb.png,English', + 'es' => 'es.png,Spanish', + 'it' => 'it.png,Italian', + ); + + public static function sanitize($lang = 'en') + { + return (in_array($lang,self::$allowed)) ? sanitizeAll($lang) : 'en'; + } +} + +class MyStrings +{ + + public static $view = array( + + 'en' => array( + + 'notebooks' => array( + + 'element' => 'notebook' + + ), + + 'wifi' => array( + + 'element' => 'wifi card' + + ), + + 'videocards'=> array( + + 'element' => 'video card' + + ), + + 'printers'=> array( + + 'element' => 'printer' + + ), + + 'scanners'=> array( + + 'element' => 'scanner' + + ), + ), + + 'fr' => array( + + 'notebooks' => array( + + 'element' => 'notebook' + + ), + + 'wifi' => array( + + 'element' => 'wifi card' + + ), + + 'videocards'=> array( + + 'element' => 'video card' + + ), + + 'printers'=> array( + + 'element' => 'printer' + + ), + + 'scanners'=> array( + + 'element' => 'scanner' + + ), + ), + + 'it' => array( + + 'notebooks' => array( + + 'element' => 'notebook' + + ), + + 'wifi' => array( + + 'element' => 'wifi card' + + ), + + 'videocards'=> array( + + 'element' => 'video card' + + ), + + 'printers'=> array( + + 'element' => 'printer' + + ), + + 'scanners'=> array( + + 'element' => 'scanner' + + ), + ), + + 'es' => array( + + 'notebooks' => array( + + 'element' => 'notebook' + + ), + + 'wifi' => array( + + 'element' => 'wifi card' + + ), + + 'videocards'=> array( + + 'element' => 'video card' + + ), + + 'printers'=> array( + + 'element' => 'printer' + + ), + + 'scanners'=> array( + + 'element' => 'scanner' + + ), + ), + ); + + //type => controller + public static $reverse = array( + 'notebook' => 'notebooks', + 'wifi' => 'wifi', + 'videocard' => 'videocards', + 'printer' => 'printers', + 'scanner' => 'scanners', + ); + + public static function getTypes() + { + return implode(',',array_keys(self::$reverse)); + } + +} \ No newline at end of file -- cgit v1.2.3