<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Developer; class LangUtil { public static function extractFileLangScripts($oU8qf) { goto b05G8; DCg8L: $xMSF0 = file_get_contents($oU8qf); goto beJU2; QHy_D: if (!file_exists($oU8qf)) { return ''; } goto DCg8L; b05G8: $oU8qf = base_path($oU8qf); goto QHy_D; Z0FSg: return ''; goto J8bXI; beJU2: preg_match_all('/L\\((([^()]*|\\([^()]*\\))*)\\)/', $xMSF0, $zhVL6); goto bq_JS; bq_JS: if (!empty($zhVL6[1])) { goto n1NY6; A1OQV: return '
{!! \\ModStart\\Developer\\LangUtil::langScriptPrepare(' . json_encode(array_keys($NqYkT), JSON_PRETTY_PRINT) . ') !!}'; goto btNQM; zH_zz: ksort($NqYkT); goto A1OQV; CtOXo: foreach ($zhVL6[0] as $Nrp0b) { if (preg_match('/^L\\([\'|"](.*?)[\'|"].*?\\)/', $Nrp0b, $q2Fl0)) { $NqYkT[$q2Fl0[1]] = L($q2Fl0[1]); } } goto zH_zz; n1NY6: $NqYkT = array(); goto CtOXo; btNQM: } goto Z0FSg; J8bXI: } public static function langScriptPrepare($NqYkT) { goto BC3Mk; BC3Mk: $li24p = array(); goto eysov; HareH: return join('
', $li24p); goto SHqQf; eysov: $li24p[] = '
(function(){'; goto PTlTR; d0uGr: $li24p[] = '})();'; goto HareH; PTlTR: $li24p[] = '  window.lang = window.lang||{};'; goto nTIsX; nTIsX: foreach ($NqYkT as $WfA5H) { $li24p[] = '  window.lang[' . json_encode($WfA5H) . ']=' . json_encode(L($WfA5H), JSON_UNESCAPED_UNICODE) . ';'; } goto d0uGr; SHqQf: } }