public function datatablesTranslationTableAction()
 {
     $this->view->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     header("Content-type: text/javascript");
     $baseUrl = Application_Common_OsPath::getBaseDir();
     $locale = Application_Model_Preference::GetLocale();
     echo "var datatables_dict =" . file_get_contents(Application_Common_OsPath::join($_SERVER["DOCUMENT_ROOT"], $baseUrl, "js/datatables/i18n/", $locale . ".txt"));
 }
 public function indexAction()
 {
     $CC_CONFIG = Config::getConfig();
     $baseUrl = Application_Common_OsPath::getBaseDir();
     $locale = Application_Model_Preference::GetLocale();
     $this->view->headScript()->appendFile($baseUrl . 'js/plupload/plupload.full.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
     $this->view->headScript()->appendFile($baseUrl . 'js/plupload/jquery.plupload.queue.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
     $this->view->headScript()->appendFile($baseUrl . 'js/airtime/library/plupload.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
     $this->view->headScript()->appendFile($baseUrl . 'js/plupload/i18n/' . $locale . '.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
     $this->view->headLink()->appendStylesheet($baseUrl . 'css/plupload.queue.css?' . $CC_CONFIG['airtime_version']);
 }
Esempio n. 3
0
 public static function configureLocalization($locale = null)
 {
     $codeset = 'UTF-8';
     if (is_null($locale)) {
         $lang = Application_Model_Preference::GetLocale() . '.' . $codeset;
     } else {
         $lang = $locale . '.' . $codeset;
     }
     putenv("LC_ALL={$lang}");
     putenv("LANG={$lang}");
     $res = setlocale(LC_MESSAGES, $lang);
     $domain = 'airtime';
     bindtextdomain($domain, '../locale');
     textdomain($domain);
     bind_textdomain_codeset($domain, $codeset);
 }