Skip to content

Commit d1631d6

Browse files
committed
docs: add/update description for lang()
1 parent fe86be5 commit d1631d6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

user_guide_src/source/general/common_functions.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,15 @@ Service Accessors
106106

107107
.. php:function:: lang($line[, $args[, $locale]])
108108
109-
:param string $line: The line of text to retrieve
109+
:param string $line: The language filename and the key of the text to retrieve.
110110
:param array $args: An array of data to substitute for placeholders.
111-
:param string $locale: Specify a different locale to be used instead of default one.
111+
:param string $locale: Specify a different locale to be used instead of the current locale.
112+
:returns: The text in the language file
113+
:rtype: list<string>|string
112114

113-
Retrieves a locale-specific file based on an alias string.
115+
Retrieves text from the language files.
114116

115-
For more information, see the :doc:`Localization </outgoing/localization>` page.
117+
For more information, see the :ref:`language-localization`.
116118

117119
.. php:function:: model($name[, $getShared = true[, &$conn = null]])
118120

user_guide_src/source/outgoing/localization.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ Alternatively, you can use the :doc:`Services class </concepts/services>` to ret
130130

131131
.. literalinclude:: localization/006.php
132132

133+
.. _language-localization:
134+
133135
*********************
134136
Language Localization
135137
*********************

0 commit comments

Comments
 (0)