<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Developer; class LangUtil { public static function extractFileLangScripts($sCmIC) { goto Wo_rG; nNRYi: if (!empty($EbeBB[1])) { goto sgj2W; sgj2W: $Z9_yf = array(); goto vKCUv; vKCUv: foreach ($EbeBB[0] as $yFnpO) { if (preg_match('/^L\\([\'|"](.*?)[\'|"].*?\\)/', $yFnpO, $U3UMY)) { $Z9_yf[$U3UMY[1]] = L($U3UMY[1]); } } goto D3Q91; rBx6o: return '
{!! \\ModStart\\Developer\\LangUtil::langScriptPrepare(' . json_encode(array_keys($Z9_yf), JSON_PRETTY_PRINT) . ') !!}'; goto hBkno; D3Q91: ksort($Z9_yf); goto rBx6o; hBkno: } goto MADxB; gB0ao: preg_match_all('/L\\((([^()]*|\\([^()]*\\))*)\\)/', $LTC5O, $EbeBB); goto nNRYi; WmccQ: if (!file_exists($sCmIC)) { return ''; } goto ZmRwG; Wo_rG: $sCmIC = base_path($sCmIC); goto WmccQ; MADxB: return ''; goto R0TJy; ZmRwG: $LTC5O = file_get_contents($sCmIC); goto gB0ao; R0TJy: } public static function langScriptPrepare($Z9_yf) { goto bQ9s0; bQ9s0: $rVDER = array(); goto eX_dr; vEcWJ: $rVDER[] = '})();'; goto SyKBv; SyKBv: return join('
', $rVDER); goto lF_dt; VePl2: $rVDER[] = '  window.lang = window.lang||{};'; goto HrCMC; eX_dr: $rVDER[] = '
(function(){'; goto VePl2; HrCMC: foreach ($Z9_yf as $SmtDq) { $rVDER[] = '  window.lang[' . json_encode($SmtDq) . ']=' . json_encode(L($SmtDq), JSON_UNESCAPED_UNICODE) . ';'; } goto vEcWJ; lF_dt: } }