summaryrefslogtreecommitdiffstats
path: root/system/helpers/language_helper.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-06-27 19:14:46 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-06-27 19:14:46 +0200
commitcc1be0f6fbf032896b5b1f6373cb247df648f6c8 (patch)
tree36598df1c2a9be1dd5fd811abcff6a992ccf2f34 /system/helpers/language_helper.php
parent727ec3141beefb5ee6e2852ec83309c259828e4e (diff)
Moved the <label> output ability from the language library to a language helper (hotfix for 1.6.3)
Diffstat (limited to 'system/helpers/language_helper.php')
-rw-r--r--system/helpers/language_helper.php58
1 files changed, 58 insertions, 0 deletions
diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php
new file mode 100644
index 000000000..b065ebeb6
--- /dev/null
+++ b/system/helpers/language_helper.php
@@ -0,0 +1,58 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * CodeIgniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package CodeIgniter
+ * @author ExpressionEngine Dev Team
+ * @copyright Copyright (c) 2006, EllisLab, Inc.
+ * @license http://codeigniter.com/user_guide/license.html
+ * @link http://codeigniter.com
+ * @since Version 1.0
+ * @filesource
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * CodeIgniter Language Helpers
+ *
+ * @package CodeIgniter
+ * @subpackage Helpers
+ * @category Helpers
+ * @author ExpressionEngine Dev Team
+ * @link http://codeigniter.com/user_guide/helpers/language_helper.html
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * Lang
+ *
+ * Fetches a language variable and optionally outputs a form label
+ *
+ * @access public
+ * @param string the language line
+ * @param string the id of the form element
+ * @return string
+ */
+if ( ! function_exists('lang'))
+{
+ function lang($line, $id = '')
+ {
+ $CI =& get_instance();
+ $line = $CI->lang->line($line);
+
+ if ($id != '')
+ {
+ $line = '<label for="'.$id.'">'.$line."</label>";
+ }
+
+ return $line;
+ }
+}
+
+// ------------------------------------------------------------------------
+/* End of file language_helper.php */
+/* Location: ./system/helpers/language_helper.php */ \ No newline at end of file