<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Developer; use ModStart\Core\Util\SerializeUtil; class LangUtil { public static function extractFileLangScripts($Jtt5u) { goto fqTRJ; HYId1: if (!file_exists($Jtt5u)) { return ''; } goto G4MLS; G4MLS: $BWI89 = file_get_contents($Jtt5u); goto MZpav; Y282M: if (!empty($S8gta[1])) { goto Ym9Xu; shNzD: ksort($vgBRP); goto UCw44; Ym9Xu: $vgBRP = array(); goto WVsea; UCw44: return '
{!! \\ModStart\\Developer\\LangUtil::langScriptPrepare(' . SerializeUtil::jsonEncodePretty(array_keys($vgBRP)) . ') !!}'; goto NbCcf; WVsea: foreach ($S8gta[0] as $OV1o4) { if (preg_match('/^L\\([\'|"](.*?)[\'|"].*?\\)/', $OV1o4, $oYbmq)) { $vgBRP[$oYbmq[1]] = L($oYbmq[1]); } } goto shNzD; NbCcf: } goto JL_c9; fqTRJ: $Jtt5u = base_path($Jtt5u); goto HYId1; JL_c9: return ''; goto oc8ls; MZpav: preg_match_all('/L\\((([^()]*|\\([^()]*\\))*)\\)/', $BWI89, $S8gta); goto Y282M; oc8ls: } public static function langScriptPrepare($vgBRP) { goto SjQ5t; WETW2: $klg2b[] = '
(function(){'; goto eTEmI; nlV3l: $klg2b[] = '})();'; goto DCqJb; DCqJb: return join('
', $klg2b); goto WhXFN; SjQ5t: $klg2b = array(); goto WETW2; uffCT: foreach ($vgBRP as $hNvFO) { $klg2b[] = '  window.lang[' . SerializeUtil::jsonEncode($hNvFO) . ']=' . SerializeUtil::jsonEncode(L($hNvFO)) . ';'; } goto nlV3l; eTEmI: $klg2b[] = '  window.lang = window.lang||{};'; goto uffCT; WhXFN: } }