����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 18.191.117.103 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/bofirmacademy.com/app/Helper/ |
Upload File : |
<?php use App\Models\Language; if (! function_exists('__')) { function __($key = null, $replace = [], $locale = null) { if (session()->get('local') == null) { $language = Language::where('default_language', 'on')->first(); } $main = $key; if (session()->get('local') != null) { $path = resource_path()."/lang/".session()->get('local').".json"; if(!file_exists($path)){ fopen(resource_path()."/lang/".session()->get('local').".json", "w"); file_put_contents(resource_path()."/lang/".session()->get('local').".json", '{}'); } $website = json_decode(file_get_contents(resource_path("/lang/".session()->get('local').".json")), true); $key = preg_replace('/\s+/S', " ", $key); $keyArr = explode(' ', $key); // foreach ($keyArr as $word){ // if(!str_contains($word, '_')){ // $strLowerWord = $word; // $modifiedWord = $strLowerWord; // $key = str_replace($word,$modifiedWord,$key); // } // } if (array_key_exists($key, $website)) { if (session()->get('local') == null) { return $key; } return $website[$key]; } $website[$key] = $key; file_put_contents(resource_path("/lang/".session()->get('local').".json"), json_encode($website)); if (session()->get('local') == null) { return $key; } } if (is_null($key)) { return $key; } return trans($key, $replace, $locale); } }