summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2013-07-20 01:51:08 +0200
committerDerek Jones <derek.jones@ellislab.com>2013-07-20 01:51:08 +0200
commit49c43c4449b6e0f217e7da451645b6ad7b15653e (patch)
treeab3df7e045ac7d450e98f52fbe7fbe05b6d51d3d
parentc8b742c22a54639cc30428a50dbafeee3d809329 (diff)
Update Language helper docs
-rw-r--r--user_guide_src/source/helpers/language_helper.rst34
1 files changed, 20 insertions, 14 deletions
diff --git a/user_guide_src/source/helpers/language_helper.rst b/user_guide_src/source/helpers/language_helper.rst
index 2b2342f16..9e5d9bdc9 100644
--- a/user_guide_src/source/helpers/language_helper.rst
+++ b/user_guide_src/source/helpers/language_helper.rst
@@ -5,7 +5,12 @@ Language Helper
The Language Helper file contains functions that assist in working with
language files.
-.. contents:: Page Contents
+.. contents::
+ :local:
+
+.. raw:: html
+
+ <div class="custom-index container"></div>
Loading this Helper
===================
@@ -14,23 +19,24 @@ This helper is loaded using the following code::
$this->load->helper('language');
+Available Functions
+===================
+
The following functions are available:
-lang()
-======
-.. function:: lang($line, $for = '', $attributes = array())
+.. function:: lang($line[, $for = ''[, $attributes = array()]])
- :param string $line: Language line key
- :param string $for: HTML "for" attribute (ID of the element we're creating a label for)
- :param array $attributes: Any additional HTML attributes
- :returns: string
+ :param string $line: Language line key
+ :param string $for: HTML "for" attribute (ID of the element we're creating a label for)
+ :param array $attributes: Any additional HTML attributes
+ :returns: string
-This function returns a line of text from a loaded language file with
-simplified syntax that may be more desirable for view files than
-``CI_Lang::line()``.
+ This function returns a line of text from a loaded language file with
+ simplified syntax that may be more desirable for view files than
+ ``CI_Lang::line()``.
-Example::
+ Example::
- echo lang('language_key', 'form_item_id', array('class' => 'myClass');
- // Outputs: <label for="form_item_id" class="myClass">Language line</label> \ No newline at end of file
+ echo lang('language_key', 'form_item_id', array('class' => 'myClass');
+ // Outputs: <label for="form_item_id" class="myClass">Language line</label> \ No newline at end of file