当前位置: 首页>>代码示例>>PHP>>正文


PHP Bootstrap::LoadTranslation方法代码示例

本文整理汇总了PHP中Bootstrap::LoadTranslation方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootstrap::LoadTranslation方法的具体用法?PHP Bootstrap::LoadTranslation怎么用?PHP Bootstrap::LoadTranslation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bootstrap的用法示例。


在下文中一共展示了Bootstrap::LoadTranslation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: transactionLog

        transactionLog($controllerAction);

        $installer->call( $controllerAction );
    } else {
        $_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI'];
        header( "location: /errors/error404.php?url=" . urlencode( $_SERVER['REQUEST_URI'] ) );
    }
    die();
}

// Load Language Translation
Bootstrap::LoadTranslationObject( defined( 'SYS_LANG' ) ? SYS_LANG : "en" );

// look for a disabled workspace
if ($oServerConf->isWSDisabled( SYS_TEMP )) {
    $aMessage['MESSAGE'] = Bootstrap::LoadTranslation( 'ID_DISB_WORKSPACE' );
    $G_PUBLISH = new Publisher();
    $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
    Bootstrap::RenderPage( 'publish' );
    die();
}

// database and workspace definition
// if SYS_TEMP exists, the URL has a workspace, now we need to verify if exists their db.php file
if (defined( 'SYS_TEMP' ) && SYS_TEMP != '') {
    //this is the default, the workspace db.php file is in /shared/workflow/sites/SYS_SYS
    $pathFile = PATH_DB . SYS_TEMP . '/db.php';
    $pathFile = $filter->validateInput($pathFile,'path');
    if (file_exists( $pathFile )) {
        require_once ($pathFile);
        define( 'SYS_SYS', SYS_TEMP );
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:sysGeneric.php

示例2: getformatedDate

 /**
  * getformatedDate
  *
  * @param date $date
  * @param string $format default value 'yyyy-mm-dd',
  * @param string $lang default value ''
  *
  * @return string $ret
  */
 public function getformatedDate($date, $format = 'yyyy-mm-dd', $lang = '')
 {
     /**
      * ******************************************************************************************************
      * if the year is 2008 and the format is yy then -> 08
      * if the year is 2008 and the format is yyyy then -> 2008
      *
      * if the month is 05 and the format is mm then -> 05
      * if the month is 05 and the format is m and the month is less than 10 then -> 5 else digit normal
      * if the month is 05 and the format is MM or M then -> May
      *
      * if the day is 5 and the format is dd then -> 05
      * if the day is 5 and the format is d and the day is less than 10 then -> 5 else digit normal
      * if the day is 5 and the format is DD or D then -> five
      * *******************************************************************************************************
      */
     //scape the literal
     switch ($lang) {
         case 'es':
             $format = str_replace(' de ', '[of]', $format);
             break;
     }
     //first we must formatted the string
     $format = str_replace('yyyy', '{YEAR}', $format);
     $format = str_replace('yy', '{year}', $format);
     $format = str_replace('mm', '{YONTH}', $format);
     $format = str_replace('m', '{month}', $format);
     $format = str_replace('M', '{XONTH}', $format);
     $format = str_replace('dd', '{DAY}', $format);
     $format = str_replace('d', '{day}', $format);
     $format = str_replace('h', '{h}', $format);
     $format = str_replace('i', '{i}', $format);
     $format = str_replace('s', '{s}', $format);
     if ($lang === '') {
         $lang = defined(SYS_LANG) ? SYS_LANG : 'en';
     }
     $aux = explode(' ', $date);
     //para dividir la fecha del dia
     $date = explode('-', isset($aux[0]) ? $aux[0] : '00-00-00');
     //para obtener los dias, el mes, y el año.
     $time = explode(':', isset($aux[1]) ? $aux[1] : '00:00:00');
     //para obtener las horas, minutos, segundos.
     $year = (int) (isset($date[0]) ? $date[0] : '0');
     //year
     $month = (int) (isset($date[1]) ? $date[1] : '0');
     //month
     $day = (int) (isset($date[2]) ? $date[2] : '0');
     //day
     $h = isset($time[0]) ? $time[0] : '00';
     //hour
     $i = isset($time[1]) ? $time[1] : '00';
     //minute
     $s = isset($time[2]) ? $time[2] : '00';
     //second
     $MONTHS = array();
     for ($i = 1; $i <= 12; $i++) {
         $MONTHS[$i] = Bootstrap::LoadTranslation("ID_MONTH_{$i}", $lang);
     }
     $d = (int) $day;
     $dd = Bootstrap::complete_field($day, 2, 1);
     //missing D
     $M = $MONTHS[$month];
     $m = (int) $month;
     $mm = Bootstrap::complete_field($month, 2, 1);
     $yy = substr($year, strlen($year) - 2, 2);
     $yyyy = $year;
     $names = array('{day}', '{DAY}', '{month}', '{YONTH}', '{XONTH}', '{year}', '{YEAR}', '{h}', '{i}', '{s}');
     $values = array($d, $dd, $m, $mm, $M, $yy, $yyyy, $h, $i, $s);
     $ret = str_replace($names, $values, $format);
     //recovering the original literal
     switch ($lang) {
         case 'es':
             $ret = str_replace('[of]', ' de ', $ret);
             break;
     }
     return $ret;
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:86,代码来源:class.bootstrap.php

示例3: array

            $_SESSION['__EE_SW_PMLICENSEMANAGER__'] = 1;
            $_SESSION['phpLastFileFound'] = '';
            $_SESSION['USERNAME_PREVIOUS1'] = $decodedResp->user['0']->USR_USERNAME;
            $_SESSION['USERNAME_PREVIOUS2'] = $decodedResp->user['0']->USR_USERNAME;
            $_SESSION['WORKSPACE'] = $pmws;
            $_SESSION['USER_LOGGED'] = $decodedResp->user['0']->USR_UID;
            $_SESSION['USR_USERNAME'] = $decodedResp->user['0']->USR_USERNAME;
            $_SESSION['USR_FULLNAME'] = $decodedResp->user['0']->USR_FIRSTNAME . ' ' . $decodedResp->user['0']->USR_LASTNAME;
            $_SESSION['__sw__'] = 1;
            //session created
        } else {
            echo Bootstrap::LoadTranslation('ID_USER_NOT_ACTIVE');
            die;
        }
    } else {
        echo Bootstrap::LoadTranslation('ID_USER_DOES_NOT_CORRESPOND');
        die;
    }
}
if ($action == "draft") {
    //sending the email
    $curlApp = curl_init('https://' . $server . '/api/1.0/' . $pmws . '/gmailIntegration/sendEmail/' . $appUid . '/to/' . $gmail . '/index/' . $delIndex);
    curl_setopt($curlApp, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $pmtoken));
    curl_setopt($curlApp, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($curlApp, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curlApp, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curlApp, CURLOPT_CONNECTTIMEOUT, 0);
    $curl_response_app = curl_exec($curlApp);
    curl_close($curlApp);
    $mainUrl = '/sys' . $pmws . '/en/' . $enviroment . '/cases/open?APP_UID=' . $appUid . '&DEL_INDEX=' . $delIndex . '&action=' . $action . '&gmail=1';
    header('location:' . $mainUrl);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:sso.php


注:本文中的Bootstrap::LoadTranslation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。