diff options
author | Andrew <browner12@gmail.com> | 2014-02-11 09:55:48 +0100 |
---|---|---|
committer | Andrew <browner12@gmail.com> | 2014-02-11 09:55:48 +0100 |
commit | b6d8b962e44202a74c9b9321a4a53f61a753fccf (patch) | |
tree | 2d3c533a55964a0d124f7cd6bb1d3d98c7b84056 /user_guide_src/source/helpers/language_helper.rst | |
parent | 41713aaa665189dd0a191c333c73c4a7b9f37c78 (diff) | |
parent | 29e12641a1bb952f493462db6757ae12c7da1f2c (diff) |
Merge branch 'develop' into patch-1
Conflicts:
system/libraries/Calendar.php
Diffstat (limited to 'user_guide_src/source/helpers/language_helper.rst')
-rw-r--r-- | user_guide_src/source/helpers/language_helper.rst | 35 |
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 |