<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Developer; class LangUtil { public static function extractFileLangScripts($yHf3t) { goto JGQVk; ETfDD: if (!file_exists($yHf3t)) { return ''; } goto VJPZ9; JGQVk: $yHf3t = base_path($yHf3t); goto ETfDD; QjmcV: preg_match_all('/L\\((([^()]*|\\([^()]*\\))*)\\)/', $cgjRu, $eG2e9); goto Op6Rl; VJPZ9: $cgjRu = file_get_contents($yHf3t); goto QjmcV; L9mfP: return ''; goto u0n4x; Op6Rl: if (!empty($eG2e9[1])) { goto lIWRD; lIWRD: $q4ww0 = array(); goto zXnNG; zXnNG: foreach ($eG2e9[0] as $ZpLX1) { if (preg_match('/^L\\([\'|"](.*?)[\'|"].*?\\)/', $ZpLX1, $mOvhz)) { $q4ww0[$mOvhz[1]] = L($mOvhz[1]); } } goto F3TxF; F3TxF: ksort($q4ww0); goto nJNeG; nJNeG: return '
{!! \\ModStart\\Developer\\LangUtil::langScriptPrepare(' . json_encode(array_keys($q4ww0), JSON_PRETTY_PRINT) . ') !!}'; goto tlGcD; tlGcD: } goto L9mfP; u0n4x: } public static function langScriptPrepare($q4ww0) { goto QsAvv; QsAvv: $Y4z0U = array(); goto H6V3t; a7EYk: $Y4z0U[] = '  window.lang = window.lang||{};'; goto bm208; dlyO8: return join('
', $Y4z0U); goto KjC67; bm208: foreach ($q4ww0 as $qhkUf) { $Y4z0U[] = '  window.lang[' . json_encode($qhkUf) . ']=' . json_encode(L($qhkUf), JSON_UNESCAPED_UNICODE) . ';'; } goto DQrec; H6V3t: $Y4z0U[] = '
(function(){'; goto a7EYk; DQrec: $Y4z0U[] = '})();'; goto dlyO8; KjC67: } }