From fc6f444f74b54a3c7ff3c53ba7fdf83378a86bcc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 14:15:49 +0300 Subject: [ci skip] Clarify lang() helper docs As requested in #4693 --- user_guide_src/source/helpers/language_helper.rst | 13 ++++++++----- 1 file 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: \ No newline at end of file -- cgit v1.2.3-24-g4f1b