summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/language_helper.rst
diff options
context:
space:
mode:
authorJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
committerJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
commit3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch)
treef32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /user_guide_src/source/helpers/language_helper.rst
parent275cf274860c6ed181d50b398efd3a21d7ba9135 (diff)
parenta9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts: user_guide_src/source/changelog.rst Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'user_guide_src/source/helpers/language_helper.rst')
-rw-r--r--user_guide_src/source/helpers/language_helper.rst25
1 files changed, 14 insertions, 11 deletions
diff --git a/user_guide_src/source/helpers/language_helper.rst b/user_guide_src/source/helpers/language_helper.rst
index b7b23d149..8b039374d 100644
--- a/user_guide_src/source/helpers/language_helper.rst
+++ b/user_guide_src/source/helpers/language_helper.rst
@@ -10,24 +10,27 @@ language files.
Loading this Helper
===================
-This helper is loaded using the following code
-
-::
+This helper is loaded using the following code::
$this->load->helper('language');
The following functions are available:
-lang('language line', 'element id')
-===================================
+lang()
+======
+
+.. php:function:: lang($line, $id = '')
+
+ :param string $line: Language line key
+ :param string $id: ID of the element we're creating a label for
+ :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 calling
-`$this->lang->line()`. The optional second parameter will also output a
-form label for you. Example
+simplified syntax that may be more desirable for view files than
+``CI_Lang::line()``.
+The optional second parameter will also output a form label for you.
-::
+Example::
echo lang('language_key', 'form_item_id');
- // becomes <label for="form_item_id">language_key</label>
-
+ // becomes <label for="form_item_id">language_key</label> \ No newline at end of file