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


PHP kohana::lang方法代码示例

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


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

示例1: testConvertVagueDate_To_Unknown

 public function testConvertVagueDate_To_Unknown()
 {
     $vd = array(null, null, 'U');
     $s = vague_date::vague_date_to_string($vd);
     $this->assertEquals(kohana::lang('dates.unknown'), $s);
     $vd = array('', '', 'U');
     $s = vague_date::vague_date_to_string($vd);
     $this->assertEquals(kohana::lang('dates.unknown'), $s);
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:9,代码来源:vague_dateTest.php

示例2: getDefaults

 /**
  *  Setup the default values to use when loading this controller to edit a new page.   
  */
 protected function getDefaults()
 {
     $r = parent::getDefaults();
     if ($this->uri->method(false) == 'create') {
         // survey id is passed as first argument in URL when creating. But the image
         // gets linked by meaning, so fetch the meaning_id.
         $r['survey:id'] = $this->uri->argument(1);
         $r['survey_medium:survey_id'] = $this->uri->argument(1);
         $r['survey_medium:caption'] = kohana::lang('misc.new_image');
     }
     return $r;
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:15,代码来源:survey_medium.php

示例3: getDefaults

 /**
  *  Setup the default values to use when loading this controller to create a new image.   
  */
 protected function getDefaults()
 {
     $r = parent::getDefaults();
     if ($this->uri->method(false) == 'create') {
         // taxa_taxon_list id is passed as first argument in URL when creating. But the image
         // gets linked by meaning, so fetch the meaning_id.
         $ttl = ORM::Factory('taxa_taxon_list', $this->uri->argument(1));
         $r['taxa_taxon_list:id'] = $this->uri->argument(1);
         $r['taxon_medium:taxon_meaning_id'] = $ttl->taxon_meaning_id;
         $r['taxon_medium:caption'] = kohana::lang('misc.new_image');
     }
     return $r;
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:16,代码来源:taxon_medium.php

示例4: active_user

 public function active_user()
 {
     $return_struct = array('status' => 0, 'code' => 501, 'msg' => kohana::lang('o_global.not_implemented'), 'content' => array());
     try {
         $user_id = $this->input->post('user_id');
         if (!$user_id) {
             throw new MyRuntimeException(Kohana::lang('o_global.bad_request'), 403);
         }
         $user = Myuser::instance($user_id)->get();
         $data['register_mail_active'] = 1;
         $data['id'] = $user_id;
         if ($user = Myuser::instance($user_id)->edit($data)) {
             $return_struct = array('status' => 1, 'code' => 200, 'msg' => Kohana::lang('o_global.update_success'), 'content' => $user);
             exit(json_encode($return_struct));
         }
     } catch (MyRuntimeException $ex) {
         $return_struct = array('status' => 0, 'code' => 501, 'msg' => $ex->getMessage(), 'content' => array());
         if (request::is_ajax()) {
             exit(json_encode($return_struct));
         } else {
             remind::set($ex->getMessage(), 'user/user');
         }
     }
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:24,代码来源:user.php

示例5: defined

?>
<?php 
defined('SYSPATH') or die('No direct access allowed.');
?>
<h2><?php 
echo Kohana::lang('page.edit_page');
?>
</h2>

<? base::errors($errors); ?>

<?
echo form::open(NULL, array('class' => 'glForms'));
echo form::label('heading', kohana::lang('page.heading'));
echo form::input('heading', ($form['heading']));
echo '<br />';
echo form::label('url', Kohana::lang('page.url'));
echo form::input('url', ($form['url']),'readonly="readonly"');
echo '<div class="cleaner">&nbsp;</div>';
echo '<br />';
echo form::label('page_text', Kohana::lang('page.text'));
echo form::textarea('page_text', ($form['page_text']), 'class="richEditor" cols="60" rows="20"');
echo '<br />';
echo form::label('display_menu', kohana::lang('page.display_menu'));
echo form::checkbox('display_menu', 1,($form['display_menu']));
echo '<br />';
echo form::label('submit', '&nbsp;');
echo form::submit('submit', Kohana::lang('page.edit'),'class=button');
echo '<br />';
echo form::close();
?>
开发者ID:repli2dev,项目名称:re-eshop,代码行数:31,代码来源:page_edit.php

示例6:

echo form::input('customer_phone', $form['customer_phone']);

echo form::close_fieldset();

echo form::open_fieldset();
echo form::legend(Kohana::lang('eshop.billing_info'));

echo form::label('billing_name', kohana::lang('eshop.name'));
echo form::input('billing_name', $form['billing_name']);
echo "<br />";
echo form::label('billing_street', kohana::lang('eshop.street'));
echo form::input('billing_street', $form['billing_street']);
echo "<br />";
echo form::label('billing_city', kohana::lang('eshop.city'));
echo form::input('billing_city', $form['billing_city']);
echo "<br />";
echo form::label('billing_postal_code', kohana::lang('eshop.postal_code'));
echo form::input('billing_postal_code', $form['billing_postal_code'],'size="8"');
echo "<br />";
echo form::label('billing_identity_number', kohana::lang('eshop.identity_number'));
echo form::input('billing_identity_number', $form['billing_identity_number'],'size="8"');
echo "<br />";
echo form::label('billing_vat_number', kohana::lang('eshop.vat_number'));
echo form::input('billing_vat_number', $form['billing_vat_number'],'size="12"');
echo form::close_fieldset();

echo form::label('submit', '&nbsp;');
echo form::submit('submit', Kohana::lang('eshop.update'),'class=button');
echo '<br />';
echo form::close();
?>
开发者ID:repli2dev,项目名称:re-eshop,代码行数:31,代码来源:customer_profile.php

示例7: defined

<?php 
defined('SYSPATH') or die('No direct access allowed.');
?>
<h3><?php 
echo Kohana::lang('eshop.customer_detail');
?>
</h3>

<h4><? echo (Kohana::lang('eshop.personal_info')); ?></h4>

<p><? echo Kohana::lang('eshop.name'); ?>: <strong><? echo $row['name']; ?></strong></p>
<p><? echo Kohana::lang('eshop.email'); ?>: <strong><? echo $row['email']; ?></strong></p>

<p><? echo Kohana::lang('eshop.street'); ?>: <strong><br /><? echo $row['customer_street']; ?><br />
<? echo $row['customer_city']; ?><br />
<? echo $row['customer_postal_code']; ?></strong></p>
<p><? echo kohana::lang('eshop.phone'); ?>: <strong><? echo $row['customer_phone']; ?></strong></p>

<h4><? echo Kohana::lang('eshop.billing_info'); ?></h4>

<p><? echo kohana::lang('eshop.name'); ?>: <strong><? echo $row['billing_name']; ?></strong></p>
<p><? echo Kohana::lang('eshop.street'); ?>: <strong><br /><? echo $row['billing_street']; ?><br />
<? echo $row['billing_city']; ?><br />
<? echo $row['billing_postal_code']; ?></strong></p>
<p><? echo kohana::lang('eshop.identity_number'); ?>: <strong><? echo $row['billing_identity_number']; ?></strong></p>
<p><? echo kohana::lang('eshop.vat_number'); ?>: <strong><? echo $row['billing_vat_number']; ?></strong></p>

<h4><? echo Kohana::lang('eshop.other'); ?></h4>

<p><? echo kohana::lang('eshop.number_orders'); ?>: <strong><? echo $num_orders; ?></strong></p>
开发者ID:repli2dev,项目名称:re-eshop,代码行数:30,代码来源:customer_detail.php

示例8: defined

<? 
/**
 *@package Eshop
 **/
?>
<?php 
defined('SYSPATH') or die('No direct access allowed.');
?>
<h2><?php 
echo Kohana::lang('eshop.add_cat');
?>
</h2>

<? base::errors($errors); ?>

<?
echo form::open(NULL, array('class' => 'glForms'));
echo form::label('name', kohana::lang('eshop.name'));
echo form::input('name', ($form['name']));
echo '<div class="cleaner">&nbsp;</div>';
echo form::label('parent', Kohana::lang('eshop.parent_cat'));
echo form::dropdown('parent',$selection,$form['parent']);
echo '<br />';
echo form::label('submit', '&nbsp;');
echo form::submit('submit', Kohana::lang('eshop.add'),'class=button');
echo '<br />';
echo form::close();
?>
开发者ID:repli2dev,项目名称:re-eshop,代码行数:28,代码来源:cat_add.php

示例9: defined

 *@package Search
 **/
?>
<?php 
defined('SYSPATH') or die('No direct access allowed.');
?>
<h2><?php 
echo Kohana::lang('search.search');
?>
</h2>

<? base::errors($errors); ?>

<?
echo form::open(NULL, array('class' => 'glForms'));
echo form::label('value', kohana::lang('search.value'));
echo form::input('value', ($form['value']));
echo '<br />';
echo form::label('submit', '&nbsp;');
echo form::submit('submit', Kohana::lang('search.go'),'class=button');
echo '<br />';
echo form::close();
?>
<div class="cleaner">&nbsp;</div>
<hr />

<? // Rendering products results ?>
<h2><?php 
echo Kohana::lang('search.results_for_products');
?>
</h2>
开发者ID:repli2dev,项目名称:re-eshop,代码行数:31,代码来源:search.php

示例10: populateFkLookups

 /**
  * When a field is present in the model that is an fkField, this means it contains a lookup
  * caption that must be searched for in the fk entity. This method does the searching and
  * puts the fk id back into the main model so when it is saved, it links to the correct fk
  * record.
  * Respects the setting $cacheFkLookups to use the cache if possible.
  *
  * @return boolean True if all lookups populated successfully.
  */
 private function populateFkLookups()
 {
     $r = true;
     if (array_key_exists('fkFields', $this->submission)) {
         foreach ($this->submission['fkFields'] as $a => $b) {
             if (!empty($b['fkSearchValue'])) {
                 // if doing a parent lookup in a list based entity (terms or taxa), then filter to lookup within the list.
                 if (isset($this->list_id_field) && $b['fkIdField'] === 'parent_id' && !isset($b['fkSearchFilterField'])) {
                     $b['fkSearchFilterField'] = $this->list_id_field;
                     $b['fkSearchFilterValue'] = $this->submission['fields'][$this->list_id_field]['value'];
                 }
                 $fk = $this->fkLookup($b);
                 if ($fk) {
                     $this->submission['fields'][$b['fkIdField']] = array('value' => $fk);
                 } else {
                     // look for a translation of the field name
                     $lookingIn = kohana::lang("default.dd:{$this->object_name}:{$a}");
                     if ($lookingIn === "default.dd:{$this->object_name}:{$a}") {
                         $fields = $this->getSubmittableFields(FALSE);
                         $lookingIn = empty($fields[$this->object_name . ':' . $a]) ? $b['readableTableName'] . ' ' . ucwords($b['fkSearchField']) : $fields[$this->object_name . ':' . $a];
                     }
                     $this->errors[$a] = "Could not find \"{$b['fkSearchValue']}\" in {$lookingIn}";
                     $r = false;
                 }
             }
         }
     }
     return $r;
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:38,代码来源:MY_ORM.php

示例11:

echo data_entry_helper::text_input(array('label' => 'Name', 'fieldname' => 'trigger:name', 'default' => html::initial_value($values, 'trigger:name'), 'class' => 'control-width-5'));
echo data_entry_helper::textarea(array('label' => 'Description', 'fieldname' => 'trigger:description', 'default' => html::initial_value($values, 'trigger:description')));
echo data_entry_helper::select(array('label' => 'Trigger template', 'fieldname' => 'trigger:trigger_template_file', 'default' => html::initial_value($values, 'trigger:trigger_template_file'), 'lookupValues' => $other_data['triggerFileList']));
echo data_entry_helper::checkbox(array('label' => 'Public', 'fieldname' => 'trigger:public', 'default' => html::initial_value($values, 'trigger:public')));
data_entry_helper::link_default_stylesheet();
// No need to re-link to jQuery
data_entry_helper::$dumped_resources[] = 'jquery';
data_entry_helper::$dumped_resources[] = 'jquery_ui';
data_entry_helper::$dumped_resources[] = 'fancybox';
echo data_entry_helper::dump_javascript();
?>
</fieldset>
<fieldset class="button-set">
<input type="submit" name="submit" value="<?php 
echo kohana::lang('misc.next');
?>
" class="ui-corner-all ui-state-default button ui-priority-primary" />
<input type="submit" name="submit" value="<?php 
echo kohana::lang('misc.cancel');
?>
" class="ui-corner-all ui-state-default button" />
<input type="submit" name="submit" value="<?php 
echo kohana::lang('misc.delete');
?>
" onclick="if (!confirm('<?php 
echo kohana::lang('misc.confirm_delete');
?>
')) {return false;}" class="ui-corner-all ui-state-default button" />
</fieldset>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:trigger_edit.php

示例12: form_buttons

 /** 
  * Return HTML to output the default OK and Cancel buttons to display at the bottom of an edit form. Also
  * outputs a delete button if the $allowDelete parameter is true.
  * 
  * @param boolean $allowDelete If true, then a delete button is included in the output.
  * @param boolean $readOnly If true, then the only button is a form cancel button.
  * @param boolean $allowUserSelectNextPage If true then then a select control is output which lets the user define
  * whether to continue adding records on the add new page or to return the index page for the current model.
  */
 public static function form_buttons($allowDelete, $readOnly = false, $allowUserSelectNextPage = true)
 {
     $r = '<fieldset class="button-set">' . "\n";
     if ($readOnly) {
         $r .= '<input type="submit" name="submit" value="' . kohana::lang('misc.cancel') . '" class="ui-corner-all ui-state-default button" />' . "\n";
     } else {
         $r .= '<input type="submit" name="submit" value="' . kohana::lang('misc.save') . '" class="ui-corner-all ui-state-default button ui-priority-primary" />' . "\n";
         $r .= '<input type="submit" name="submit" value="' . kohana::lang('misc.cancel') . '" class="ui-corner-all ui-state-default button" />' . "\n";
         if ($allowDelete) {
             $r .= '<input type="submit" name="submit" value="' . kohana::lang('misc.delete') . '" onclick="if (!confirm(\'' . kohana::lang('misc.confirm_delete') . '\')) {return false;}" class="ui-corner-all ui-state-default button" />' . "\n";
         }
         // add a drop down to select action after submit clicked. Needs to remember its previous setting from the session,
         // since we normally arrive here after a redirect.
         if (isset($_SESSION['what-next']) && $_SESSION['what-next'] == 'add') {
             $selAdd = ' selected="selected"';
             $selReturn = '';
         } else {
             $selAdd = '';
             $selReturn = ' selected="selected"';
         }
         if ($allowUserSelectNextPage) {
             $r .= '<label for="next-action">' . kohana::lang('misc.then') . '</label>';
             $r .= '<select id="what-next" name="what-next"><option value="return"' . $selReturn . '>go back to the list</option><option value="add"' . $selAdd . '>add new</option></select>';
         }
     }
     $r .= '</fieldset>';
     return $r;
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:37,代码来源:MY_html.php

示例13: postSubmit

 /**
  * If this occurrence record status was reset after an edit, then log a comment.
  */
 public function postSubmit($isInsert)
 {
     if ($this->requeuedForVerification && !$isInsert) {
         $data = array('occurrence_id' => $this->id, 'comment' => kohana::lang('misc.recheck_verification'), 'auto_generated' => 't');
         $comment = ORM::factory('occurrence_comment');
         $comment->validate(new Validation($data), true);
     }
     return true;
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:12,代码来源:occurrence.php

示例14:

<p><? echo kohana::lang('eshop.vat_number'); ?>: <strong><? echo $profile['billing_vat_number']; ?></strong></p>
<? echo form::close_fieldset();
echo '<br />';
echo form::open_fieldset();
echo form::legend(Kohana::lang('eshop.delivery_info'));

echo form::label('delivery_name', kohana::lang('eshop.name'));
echo form::input('delivery_name', $form['delivery_name']);
echo "<br />";
echo form::label('delivery_street', kohana::lang('eshop.street'));
echo form::input('delivery_street', $form['delivery_street']);
echo "<br />";
echo form::label('delivery_city', kohana::lang('eshop.city'));
echo form::input('delivery_city', $form['delivery_city']);
echo "<br />";
echo form::label('delivery_postal_code', kohana::lang('eshop.postal_code'));
echo form::input('delivery_postal_code', $form['delivery_postal_code'],'size="8"');
echo form::close_fieldset();

echo form::open_fieldset();
echo form::legend(Kohana::lang('eshop.payment'));
foreach($payment_methods as $row){
	echo form::label('payment',$row['name']);
	if($form['payment'] == $row['id']){
		echo form::radio('payment',$row['id'],TRUE);
	} else {
		echo form::radio('payment',$row['id'],FALSE);
	}
	echo '<br />';
}
echo form::close_fieldset();
开发者ID:repli2dev,项目名称:re-eshop,代码行数:31,代码来源:cart_checkout.php

示例15: array

echo Kohana::lang('user.settings');
?>
</h2>
<p><?php 
echo Kohana::lang('user.settings_text');
?>
</p>

<? base::success($success); ?>
<? base::errors($errors); ?>

<?
echo form::open(NULL, array('class' => 'glForms'));
echo form::open_fieldset();
echo form::legend(Kohana::lang('user.changedata'));
echo form::label('fullname', kohana::lang('user.yourname'));
echo form::input('fullname', ($form['fullname']));
echo '<br />';
echo form::close_fieldset();
echo form::open_fieldset();
echo form::legend(Kohana::lang('user.changepassword'));
echo form::label('password3', Kohana::lang('user.password3'));
echo form::password('password3', $form['password3']);
echo '<br />';
echo form::label('password2', Kohana::lang('user.password2'));
echo form::password('password2', $form['password2']);
echo '<br />';
echo form::label('password', Kohana::lang('user.password'));
echo form::password('password', $form['password']);
echo form::close_fieldset();
echo form::label('submit', '&nbsp;');
开发者ID:repli2dev,项目名称:re-eshop,代码行数:31,代码来源:setting.php


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