> For the complete documentation index, see [llms.txt](https://help.glpi-project.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.glpi-project.org/documentation/fr/advanced/override-locales.md).

# Remplacer les paramètres régionaux GLPI

GLPI utilise l'outil [gettext](https://www.gnu.org/software/gettext/) pour gérer ses traductions. Vous pouvez substituer les valeurs par défaut. C'est la méthode préférée plutôt que de modifier les fichiers `.po` originaux et de risquer de perdre vos modifications lors de la mise à jour de GLPI.

Pour ce faire, vous devez créer un fichier nommé `nom_fichier.po` dans le répertoire `files/_locales/core/`. Vous pouvez également créer des substitutions pour les plugins en utilisant la même méthode dans le répertoire `files/_locales/pluginkey/`, où `pluginkey` correspond au nom du dossier du plugin.

{% hint style="info" %}
Selon votre configuration GLPI, le répertoire `_locales` peut être situé ailleurs (si vous avez fourni un fichier `local_define.php` avec une constante `GLPI_LOCAL_I18N_DIR`). Il est possible d'avoir plusieurs fichiers, pour gérer plusieurs langues par exemple.
{% endhint %}

Le fichier doit être un fichier `gettext` valide. Vous pouvez utiliser [Poedit](https://poedit.net/) pour le créer.

```po
# Fichier PO de substitution
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-13 10:43+0200\n"
"PO-Revision-Date: 2019-04-13 10:43+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: en_GB\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "Login"
msgstr "Connexion depuis gettext local"
```

`msgid` est la chaîne source, `msgstr` est la traduction. Vous pouvez trouver les phrases sources correctes à utiliser dans le fichier `locales/glpi.pot`.

Ensuite, vous devez compiler votre fichier `.po` en un fichier `.mo` lisible par GLPI. Pour ce faire, vous pouvez utiliser la commande suivante :

```
$ cd files/_locales/core/
$ msgfmt -o nom_fichier.mo nom_fichier.po
```

Enfin, GLPI utilise un système de cache pour éviter de charger les fichiers `.mo` à chaque requête. Vous devez vider le cache pour voir vos modifications. Pour ce faire, en mode Debug, allez dans "Configuration > Général", onglet "Performance" et cliquez sur le bouton "Réinitialiser" dans la section "Cache de traduction". Si vous avez accès à la ligne de commande, vous pouvez également vider ce cache en utilisant la commande CLI `glpi:cache:clear`. Si vous videz le cache avec la commande CLI, assurez-vous d'exécuter la commande en tant qu'utilisateur du serveur web.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.glpi-project.org/documentation/fr/advanced/override-locales.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
