PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/halogy/helpers/language_helper.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 58 lines | 14 code | 7 blank | 37 comment | 4 complexity | 1426c40d52fdff5ad94aa4d9bab00196 MD5 | raw file
 1<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
 2/**
 3 * CodeIgniter
 4 *
 5 * An open source application development framework for PHP 4.3.2 or newer
 6 *
 7 * @package		CodeIgniter
 8 * @author		ExpressionEngine Dev Team
 9 * @copyright	Copyright (c) 2008 - 2009, EllisLab, Inc.
10 * @license		http://codeigniter.com/user_guide/license.html
11 * @link		http://codeigniter.com
12 * @since		Version 1.0
13 * @filesource
14 */
15
16// ------------------------------------------------------------------------
17
18/**
19 * CodeIgniter Language Helpers
20 *
21 * @package		CodeIgniter
22 * @subpackage	Helpers
23 * @category	Helpers
24 * @author		ExpressionEngine Dev Team
25 * @link		http://codeigniter.com/user_guide/helpers/language_helper.html
26 */
27
28// ------------------------------------------------------------------------
29
30/**
31 * Lang
32 *
33 * Fetches a language variable and optionally outputs a form label
34 *
35 * @access	public
36 * @param	string	the language line
37 * @param	string	the id of the form element
38 * @return	string
39 */	
40if ( ! function_exists('lang'))
41{
42	function lang($line, $id = '')
43	{
44		$CI =& get_instance();
45		$line = $CI->lang->line($line);
46
47		if ($id != '')
48		{
49			$line = '<label for="'.$id.'">'.$line."</label>";
50		}
51
52		return $line;
53	}
54}
55
56// ------------------------------------------------------------------------
57/* End of file language_helper.php */
58/* Location: ./system/helpers/language_helper.php */