summaryrefslogtreecommitdiffstats
path: root/system/libraries/Language.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Language.php')
-rw-r--r--system/libraries/Language.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/system/libraries/Language.php b/system/libraries/Language.php
index f97db3506..a1f73d03b 100644
--- a/system/libraries/Language.php
+++ b/system/libraries/Language.php
@@ -108,12 +108,20 @@ class CI_Language {
* Fetch a single line of text from the language array
*
* @access public
- * @param string the language line
+ * @param string $line the language line
+ * @param string $label optional label
* @return string
*/
- function line($line = '')
+ function line($line = '', $label = '')
{
- return ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];
+ $line = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];
+
+ if ($label != '')
+ {
+ $line = '<label for="'.$label.'">'.$line."</label>";
+ }
+
+ return $line;
}
}