<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Developer; class LangUtil { public static function extractFileLangScripts($aYJAK) { goto yocUJ; geVcL: $Afv_G = file_get_contents($aYJAK); goto jH7qz; NAm03: if (!file_exists($aYJAK)) { return ''; } goto geVcL; mInAG: if (!empty($WpF0C[1])) { goto B0X2j; ZN7rR: ksort($JZhm0); goto Qmxo2; B0X2j: $JZhm0 = array(); goto Ycg2B; Qmxo2: return '
{!! \\ModStart\\Developer\\LangUtil::langScriptPrepare(' . json_encode(array_keys($JZhm0), JSON_PRETTY_PRINT) . ') !!}'; goto keDnW; Ycg2B: foreach ($WpF0C[0] as $Xvngd) { if (preg_match('/^L\\([\'|"](.*?)[\'|"].*?\\)/', $Xvngd, $zaXti)) { $JZhm0[$zaXti[1]] = L($zaXti[1]); } } goto ZN7rR; keDnW: } goto x7w_Q; jH7qz: preg_match_all('/L\\((([^()]*|\\([^()]*\\))*)\\)/', $Afv_G, $WpF0C); goto mInAG; x7w_Q: return ''; goto TCfDd; yocUJ: $aYJAK = base_path($aYJAK); goto NAm03; TCfDd: } public static function langScriptPrepare($JZhm0) { goto S0xn9; S0xn9: $PZ208 = array(); goto b3QtU; splFp: return join('
', $PZ208); goto eyvoo; wGNoG: $PZ208[] = '  window.lang = window.lang||{};'; goto Auaf7; b3QtU: $PZ208[] = '
(function(){'; goto wGNoG; Auaf7: foreach ($JZhm0 as $j0Qil) { $PZ208[] = '  window.lang[' . json_encode($j0Qil) . ']=' . json_encode(L($j0Qil), JSON_UNESCAPED_UNICODE) . ';'; } goto DuyIo; DuyIo: $PZ208[] = '})();'; goto splFp; eyvoo: } }