protected function js() { $lang = SPLang::jsLang(true); if (count($lang)) { foreach ($lang as $term => $text) { unset($lang[$term]); $term = str_replace('SP.JS_', null, $term); $lang[$term] = $text; } } if (!SPRequest::int('deb')) { SPFactory::mainframe()->cleanBuffer(); header('Content-type: text/javascript'); } echo 'SobiPro.setLang( ' . json_encode($lang) . ' );'; exit; }