-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8987c4
commit 3bac892
Showing
1 changed file
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
## jlang() | ||
> Function | ||
## jlang($key = null, $debug = false) | ||
|
||
This function is a proxy of `Language::getInstance()`. It allows to access HTML drawing classes inside twig layouts. | ||
|
||
1. [Parameters](#parameters) | ||
1. [Returns](#returns) | ||
2. [Examples](#examples) | ||
|
||
### Parameters <a id="parameters"></a> | ||
|
||
* `string` **$lang** [optional] The language to use. Default: `en-GB` | ||
* `boolean` **$debug** [optional] The debug mode. Default: `false` | ||
|
||
### Returns <a id="returns"></a> | ||
|
||
`\Joomla\CMS\Language\Language` Language object | ||
|
||
### Examples <a id="examples"></a> | ||
|
||
```twig | ||
{# Show the spanish language name #} | ||
{% raw %}{{ jlang('es-ES').getName() }}{% endraw %} | ||
``` |