コード例 #1
0
ファイル: Trans.php プロジェクト: Puskice/PuskiceCMS
 public static function _t($text)
 {
     if (Session::get('trans') != 'lat' && Session::get('trans') != 'cyr') {
         Session::put('trans', "lat");
     }
     if (Input::get('l')) {
         Session::put('trans', Input::get('l'));
     }
     if (Session::get('trans') == "lat") {
         $text = Trans::cir2lat($text);
     }
     return html_entity_decode($text, ENT_QUOTES, "UTF-8");
 }
コード例 #2
0
 public function postToLatin()
 {
     return Response::json(array('status' => 'success', 'response' => html_entity_decode(Trans::cir2lat(htmlspecialchars_decode(Trans::stripuj(Input::get('text')))), ENT_QUOTES, "UTF-8")));
 }