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


PHP Vtiger_Language_Handler::getLanguageTranslatedString方法代码示例

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


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

示例1: replaceCompanyFields

 /**
  * Replaces Company details variables with values
  * @param string $content - text
  * @return string text with replaced values
  */
 public function replaceCompanyFields(&$content)
 {
     if (empty($content)) {
         return $content;
     }
     $companyDetails = getCompanyDetails();
     foreach ($companyDetails as $name => $value) {
         if ($name === 'logoname') {
             $value = 'storage/Logo/' . $value;
         }
         $content = str_replace('$Company+' . $name . '$', $value, $content);
         $newLabel = Vtiger_Language_Handler::getLanguageTranslatedString($this->get('language'), $name, 'Settings:Vtiger');
         $content = str_replace('%Company+' . $name . '%', $newLabel, $content);
     }
     return $content;
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:21,代码来源:PDF.php

示例2: content_569c96381397c

    function content_569c96381397c($_smarty_tpl)
    {
        ?>
<div class="container-fluid"><div class="widget_header row-fluid"><div class="span8"><h2><?php 
        echo vtranslate('LBL_MODULE_NAME', $_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);
        ?>
</h2></div></div><hr><form method="post" action="index.php?module=ITS4YouLabels&parent=Settings&action=Save" id="moduleBlocksAndFields"><div class="widget_header row-fluid"><span class="span8"><strong><span class="lead span9 marginLeftZero"><?php 
        echo vtranslate('LBL_EDIT_LANGUAGE', $_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);
        ?>
</span></strong></span><span class="span4"><span class="pull-right"><button class="btn btn-success" type="button"><strong><?php 
        echo vtranslate('LBL_SAVE', $_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);
        ?>
</strong></button>&nbsp;<a class="cancelLink" id="backLink" type="reset"><?php 
        echo vtranslate('LBL_CANCEL', $_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);
        ?>
</a></span></span></div><br><div id="moduleBlocks"><?php 
        $_smarty_tpl->tpl_vars['BLOCK_MODEL'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['BLOCK_MODEL']->_loop = false;
        $_smarty_tpl->tpl_vars['BLOCK_LABEL_KEY'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['BLOCKS']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['BLOCK_MODEL']->key => $_smarty_tpl->tpl_vars['BLOCK_MODEL']->value) {
            $_smarty_tpl->tpl_vars['BLOCK_MODEL']->_loop = true;
            $_smarty_tpl->tpl_vars['BLOCK_LABEL_KEY']->value = $_smarty_tpl->tpl_vars['BLOCK_MODEL']->key;
            $_smarty_tpl->tpl_vars['FIELDS_LIST'] = new Smarty_variable($_smarty_tpl->tpl_vars['BLOCK_MODEL']->value->getLayoutBlockActiveFields(), null, 0);
            $_smarty_tpl->tpl_vars['BLOCK_ID'] = new Smarty_variable($_smarty_tpl->tpl_vars['BLOCK_MODEL']->value->get('id'), null, 0);
            ?>
<div id="block_<?php 
            echo $_smarty_tpl->tpl_vars['BLOCK_ID']->value;
            ?>
" class="editFieldsTable block_<?php 
            echo $_smarty_tpl->tpl_vars['BLOCK_ID']->value;
            ?>
 marginBottom10px border1px <?php 
            if ($_smarty_tpl->tpl_vars['IS_BLOCK_SORTABLE']->value) {
                ?>
 blockSortable<?php 
            }
            ?>
" data-block-id="<?php 
            echo $_smarty_tpl->tpl_vars['BLOCK_ID']->value;
            ?>
" data-sequence="<?php 
            echo $_smarty_tpl->tpl_vars['BLOCK_MODEL']->value->get('sequence');
            ?>
" style="border-radius: 4px 4px 0px 0px;background: white;"><div class="row-fluid layoutBlockHeader"><div class="blockLabel span5 padding10 marginLeftZero" style="in"><img class="alignMiddle" src="<?php 
            echo vimage_path('drag.png');
            ?>
" />&nbsp;&nbsp;<?php 
            $_smarty_tpl->tpl_vars['STRING'] = new Smarty_variable($_smarty_tpl->tpl_vars['BLOCK_LABEL_KEY']->value, null, 0);
            $_smarty_tpl->tpl_vars['TRANSLATEDBLOCKSTRING'] = new Smarty_variable(Vtiger_Language_Handler::getLanguageTranslatedString($_smarty_tpl->tpl_vars['LANGUAGE']->value, $_smarty_tpl->tpl_vars['STRING']->value, $_smarty_tpl->tpl_vars['SELECTED_MODULE_NAME']->value), null, 0);
            if ($_smarty_tpl->tpl_vars['TRANSLATEDBLOCKSTRING']->value == '') {
                $_smarty_tpl->tpl_vars['TRANSLATEDBLOCKSTRING'] = new Smarty_variable(vtranslate($_smarty_tpl->tpl_vars['BLOCK_LABEL_KEY']->value, $_smarty_tpl->tpl_vars['SELECTED_MODULE']->value), null, 0);
            }
            ?>
<span><strong><?php 
            echo $_smarty_tpl->tpl_vars['TRANSLATEDBLOCKSTRING']->value;
            ?>
</strong></span></div></div><div class="blockFieldsList <?php 
            if ($_smarty_tpl->tpl_vars['SELECTED_MODULE_MODEL']->value->isFieldsSortableAllowed($_smarty_tpl->tpl_vars['BLOCK_LABEL_KEY']->value)) {
                ?>
blockFieldsSortable <?php 
            }
            ?>
 row-fluid" style="padding:5px;min-height: 27px"><ul name="sortable1" class="connectedSortable span6" style="list-style-type: none; float: left;min-height: 1px;padding:2px;"><?php 
            $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['FIELDS_LIST']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['smarty']->value['foreach']['fieldlist']['index'] = -1;
            foreach ($_from as $_smarty_tpl->tpl_vars['FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['FIELD_MODEL']->value) {
                $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = true;
                $_smarty_tpl->tpl_vars['smarty']->value['foreach']['fieldlist']['index']++;
                $_smarty_tpl->tpl_vars['FIELD_INFO'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo(), null, 0);
                if ($_smarty_tpl->getVariable('smarty')->value['foreach']['fieldlist']['index'] % 2 == 0) {
                    ?>
<li><div class="opacity editFields marginLeftZero border1px" data-block-id="<?php 
                    echo $_smarty_tpl->tpl_vars['BLOCK_ID']->value;
                    ?>
" data-field-id="<?php 
                    echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('id');
                    ?>
" data-sequence="<?php 
                    echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('sequence');
                    ?>
"><div class="row-fluid padding1per"><div class="span11 marginLeftZero" style="word-wrap: break-word;"><?php 
                    $_smarty_tpl->tpl_vars['STRING'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), null, 0);
                    $_smarty_tpl->tpl_vars['FIELDID'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('id'), null, 0);
                    $_smarty_tpl->tpl_vars['TRANSLATEDSTRING'] = new Smarty_variable(Vtiger_Language_Handler::getLanguageTranslatedString($_smarty_tpl->tpl_vars['LANGUAGE']->value, $_smarty_tpl->tpl_vars['STRING']->value, $_smarty_tpl->tpl_vars['SELECTED_MODULE_NAME']->value), null, 0);
                    $_smarty_tpl->tpl_vars['FROMLANG'] = new Smarty_variable(Vtiger_Language_Handler::getLanguageTranslatedString($_smarty_tpl->tpl_vars['LANGUAGE']->value, $_smarty_tpl->tpl_vars['STRING']->value, $_smarty_tpl->tpl_vars['SELECTED_MODULE_NAME']->value), null, 0);
                    if ($_smarty_tpl->tpl_vars['TRANSLATEDSTRING']->value == '') {
                        $_smarty_tpl->tpl_vars['TRANSLATEDSTRING'] = new Smarty_variable(vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), $_smarty_tpl->tpl_vars['SELECTED_MODULE']->value), null, 0);
                    }
                    $_smarty_tpl->tpl_vars['LABEL'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['LABEL']->_loop = false;
                    $_smarty_tpl->tpl_vars['fieldid'] = new Smarty_Variable();
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:101,代码来源:9f3f04280fbc6dbbf2d39a951b4f2c517eb10179.file.EditView.tpl.php


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