> For the complete documentation index, see [llms.txt](https://coldbox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://coldbox.ortusbooks.com/ecosystem/i18n.md).

# i18n

Localize ColdBox applications with cbi18n — resource bundles, locales, and per-request language detection.

**cbi18n** adds internationalization to ColdBox: resource bundles, locale-aware messages, and per-request locale detection.

```bash
box install cbi18n
```

📖 **Full documentation:** [ForgeBox](https://forgebox.io/view/cbi18n) · [GitHub](https://github.com/coldbox-modules/cbox-i18n)

## Quick Example

Store messages in resource bundles (Java `.properties` style), resolve them anywhere:

```properties
# includes/i18n/main_en.properties
welcome = Welcome back, {name}!
```

```properties
# includes/i18n/main_es.properties
welcome = ¡Bienvenido de nuevo, {name}!
```

```javascript
// In a handler or view
property name="i18n" inject="i18n@cbi18n";

message = i18n.getResource(
    resource : "welcome@main",
    values   : [ user.getName() ]
)
```

The module can detect the user's locale from the request (`Accept-Language`, URL, or cookie) and store it in the request context, so every `getResource()` call resolves in the right language automatically.

## When to Use It

* Multi-language applications
* Locale-aware validation messages (pairs with [cbvalidation](/ecosystem/validation.md))
* Centralizing user-facing strings out of views

## See Also

* [Validation](/ecosystem/validation.md) — localized error messages
* [Request Context](/the-basics/request-context.md) — where the detected locale lives


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://coldbox.ortusbooks.com/ecosystem/i18n.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
