Skip to content

Commit

Permalink
[docs] jlang() function
Browse files Browse the repository at this point in the history
  • Loading branch information
phproberto committed Nov 16, 2017
1 parent a8987c4 commit 3bac892
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions docs/functions/jlang.md
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 %}
```

0 comments on commit 3bac892

Please sign in to comment.