# Language variables

Plugins can also use the global get\_lang() function available inside the rest of the code of Chamilo, but they have to use a variation : get\_plugin\_lang(), that requires you to give the name of the plugin in which it is used.

Language variables have to be located in a lang/\[language].php file. E.g, the basic plugin language file for plugin « abc » will reside inside the plugin's subfolder « lang »: /plugin/abc/lang/english.php

The file itself has to use the following format :

```
/* Plugin's language variables */

$strings['plugin_title'] = 'ABC';
$strings['plugin_comment'] = 'Plugin for managing the … website';
$strings['SelectASession'] = 'Select a session';
```

As you can see, the format has to be set as an array called « $strings ».

The two first array elements are mandatory. They will allow administrators to see the plugin name and a short description in their own language.

To use the variables from inside the plugin, inside a template file (.tpl)... (to be completed)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chamilo.org/1.11.x/developer-guide/plugins/language_variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
