> For the complete documentation index, see [llms.txt](https://docs.0resmon.org/0resmon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0resmon.org/0resmon/0resmon-1/0r-resources/0r-forklift-operator/editing-localization-files.md).

# Editing localization files

#### Editing Localization Files <a href="#editing-localization-files" id="editing-localization-files"></a>

> ox\_lib provides a built-in localization system using JSON files stored in the `locales` folder. The `lib.locale()` function is responsible for loading the appropriate localization file based on the server’s configuration.

**Default Localization File**

> By default, `locales/ox:locale|en>.json` as the primary localization file. However, this can be changed based on the server configuration.

**Setting the Localization Language**

> The server owner can specify a different localization file by setting the `ox:locale` value in `server.cfg`. The value assigned to `ox:locale` determines which file should be loaded.

For example:

```
set ox:locale "pt"
```

This configuration instructs ox\_lib to load `locales/pt.json` instead of the default `locales/en.json`.

**Adding a New Localization File**

> To support a new language, the server owner must:
>
> 1. Create a new JSON file in the script `locales` folder, following the `locales/en.json` format.
> 2. Ensure the correct `ox:locale` value is set in `server.cfg`.
> 3. Populate the new JSON file with localized strings matching the existing structure.

Example: If the server's `ox:locale` is set to `fr`, then a corresponding `locales/fr.json` file should be created.


---

# 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://docs.0resmon.org/0resmon/0resmon-1/0r-resources/0r-forklift-operator/editing-localization-files.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.
