summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/language_helper.rst
diff options
context:
space:
mode:
authorDiederikLascaris <info@runesa.nl>2017-01-22 21:45:15 +0100
committerDiederikLascaris <info@runesa.nl>2017-01-22 21:45:15 +0100
commit312efeba32d532878c536fd28e75f39d61a9dade (patch)
tree71ae4aaca33a9d34a789d6d375acd2594160123a /user_guide_src/source/helpers/language_helper.rst
parent947f1a06093a52a32b703ee795e52c22cd66363a (diff)
parent44c7af639ac1726780b64fb5a6cb6fca2df8b651 (diff)
Merge branch 'develop' of git://github.com/bcit-ci/CodeIgniter into develop
Diffstat (limited to 'user_guide_src/source/helpers/language_helper.rst')
-rw-r--r--user_guide_src/source/helpers/language_helper.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/user_guide_src/source/helpers/language_helper.rst b/user_guide_src/source/helpers/language_helper.rst
index cadf3c0ce..cfbd6c057 100644
--- a/user_guide_src/source/helpers/language_helper.rst
+++ b/user_guide_src/source/helpers/language_helper.rst
@@ -27,17 +27,20 @@ The following functions are available:
.. php: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: HTML-formatted language line label
+ :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: The language line; in an HTML label tag, if the ``$for`` parameter is not empty
: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()``.
- Example::
+ Examples::
+
+ echo lang('language_key');
+ // Outputs: Language line
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