blob: ac0d69da14ef12de7a3190758635324a9da10482 [file] [log] [blame]
Derek Jones37f4b9c2011-07-01 17:56:50 -05001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Derek Allard2067d1a2008-11-13 22:59:24 +00002/**
3 * CodeIgniter
4 *
Greg Aker741de1c2010-11-10 14:52:57 -06005 * An open source application development framework for PHP 5.1.6 or newer
Derek Allard2067d1a2008-11-13 22:59:24 +00006 *
7 * @package CodeIgniter
8 * @author ExpressionEngine Dev Team
Greg Aker0711dc82011-01-05 10:49:40 -06009 * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
Derek Allard2067d1a2008-11-13 22:59:24 +000010 * @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
Barry Mienydd671972010-10-04 16:33:58 +020039 */
Derek Allard2067d1a2008-11-13 22:59:24 +000040if ( ! 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 */
Derek Jonescc1be0f2008-06-27 17:14:46 +000058/* Location: ./system/helpers/language_helper.php */