getDetails()->getLanguage()); $tr->setLanguage($language.DEFAULT_ENCODING, $language.DEFAULT_ENCODING); $tr->addDomain('psyhvel', 'i18n'); $tr->useDomain('psyhvel'); $res = array(); $ws = json_decode($word); foreach ($ws as $w) { if (is_array($w)) { if (is_array($w[0])) { foreach ($w as $wa) { if ($wa[0]!="") { $res[] = sprintf(gettext($wa[0]), $wa[1]); } else { $res[] = ""; } } } else { if ($w[0]!="") { $res[] = sprintf(gettext($w[0]), $w[1]); } else { $res[] = ""; } } } else { if ($w!="") { $res[] = gettext($w); } else { $res[] = ""; } } } print json_encode($res); } ?>