# How to Manage Multiple Language Locales with the `AGENT_REACH_LANG` Environment Variable in Agent Reach

> Easily manage multiple language locales in Agent Reach using the AGENT_REACH_LANG environment variable. Install English or default skill documentation seamlessly.

- Repository: [Pnant/Agent-Reach](https://github.com/Panniantong/Agent-Reach)
- Tags: how-to-guide
- Published: 2026-07-13

---

**Agent Reach uses the `AGENT_REACH_LANG` environment variable to determine whether to install English ([`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md)) or default ([`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md)) skill documentation during the CLI installation process.**

Agent Reach is an open-source framework for deploying agent skills across multiple platforms like Claude, OpenClaw, and generic agents. By configuring the **`AGENT_REACH_LANG`** environment variable, you control which language version of the skill documentation gets copied when running the install command.

## Locale Detection Logic in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py)

The localization system lives in the `_skill_resource_name` helper function within [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py). This function evaluates environment variables to determine which markdown file to install.

### Environment Variable Hierarchy

The code checks for locale values in the following priority order:

1. **`AGENT_REACH_LANG`** — The primary override specific to Agent Reach
2. **`LC_ALL`** — Standard system locale setting
3. **`LC_MESSAGES`** — System messages locale
4. **`LANG`** — Default system language

### English Locale Identification

The private helper `_is_english_locale` performs case-insensitive detection by trimming whitespace and converting the candidate string to lowercase. Any value that starts with `"en"` or `"english"` is classified as an English locale.

## Skill File Selection Process

Once the system evaluates the locale chain, it selects the appropriate skill documentation:

- **English detected**: Installs [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md) and its `references/` subdirectory
- **Non-English or unset**: Installs the default [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) and its `references/` subdirectory

These files are copied into platform-specific directories such as `.agents`, `.openclaw`, or `.claude` depending on the target agent platform.

## Practical Configuration Examples

Control language selection by setting the environment variable before running the install command:

```bash

# Use default (non-English) skill documentation

unset AGENT_REACH_LANG
python -m agent_reach.cli install

```

```bash

# Force English version using standard locale format

export AGENT_REACH_LANG=en_US.UTF-8
python -m agent_reach.cli install

```

```bash

# Any English variant works (case-insensitive)

export AGENT_REACH_LANG=english-UK
python -m agent_reach.cli install

```

```bash

# Non-English locales fall back to default

export AGENT_REACH_LANG=zh_CN
python -m agent_reach.cli install

```

## Extending Support for Additional Languages

Currently, only English receives special handling separate from the default. To add support for additional languages—such as Chinese (`zh`) or Japanese (`ja`)—you would need to:

1. Create correspondingly named markdown files (e.g., [`SKILL_zh.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_zh.md)) in the `agent_reach/skill/` directory
2. Extend the `_is_english_locale` check or add equivalent locale detection logic in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py)

Only the skill documentation is locale-aware; all other CLI output remains in English regardless of the `AGENT_REACH_LANG` setting.

## Summary

- Agent Reach checks **`AGENT_REACH_LANG`** first, then falls back to standard locale variables (`LC_ALL`, `LC_MESSAGES`, `LANG`)
- The `_is_english_locale` helper in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) identifies English locales by checking for prefixes `"en"` or `"english"`
- English locales trigger installation of [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md); all others use [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md)
- Only skill documentation respects the locale setting; CLI messages remain in English

## Frequently Asked Questions

### Does `AGENT_REACH_LANG` affect CLI output language?

No. The `AGENT_REACH_LANG` variable only controls which skill documentation file is copied during installation. All command-line interface messages, logs, and error output remain in English regardless of this setting.

### What happens if I set `AGENT_REACH_LANG` to a non-English locale like `fr_FR`?

The system treats any non-English locale as the default case. When set to `fr_FR` or any other value that does not start with `"en"` or `"english"`, the CLI installs [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) rather than [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md). Currently, there is no specific French skill file in the repository.

### Can I use `LC_ALL` instead of `AGENT_REACH_LANG` to set the language?

Yes. If `AGENT_REACH_LANG` is not set, the code checks `LC_ALL`, then `LC_MESSAGES`, and finally `LANG` in that priority order. You can use any of these standard Unix locale variables to trigger English skill documentation installation, provided their values start with `"en"` or `"english"`.

### Where are the locale-specific skill files located?

The markdown files are stored in the `agent_reach/skill/` directory. The default file is [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md), while the English variant is [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md). Both files have corresponding `references/` subdirectories that get copied alongside the main documentation during installation into the target platform directory.