summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/language_helper.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-09 16:30:06 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-09 16:30:06 +0100
commitc2804a3f3eb085abcc50e8df51085db7a94c18d2 (patch)
treeb53e8a2798a75fa4f92ee2cc3201635ce7df319a /user_guide_src/source/helpers/language_helper.rst
parentf6600f840125eadf2366c2244f78ad95defb156b (diff)
parentdb97fe561f03284a287c9a588ac1ff19a9f5e71d (diff)
Merge branch 'develop' into 'feature/encryption'
Diffstat (limited to 'user_guide_src/source/helpers/language_helper.rst')
-rw-r--r--user_guide_src/source/helpers/language_helper.rst35
1 files changed, 21 insertions, 14 deletions
diff --git a/user_guide_src/source/helpers/language_helper.rst b/user_guide_src/source/helpers/language_helper.rst
index 1911e3bfd..e4d093725 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,25 @@ This helper is loaded using the following code::
$this->load->helper('language');
+Available Functions
+===================
+
The following functions are available:
-lang()
-======
-.. php: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: HTML-formatted language line label
+ :rtype: 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