Configuration

# Configuration reference

Every key under defaults: (and packages:), with its default value.

## Locales & state

| Key | Default | Description |
| --- | --- | --- |
| `source_locale` | `en` | Locale you author in and translate *from* |
| `target_locales` | `[de, sv]` | Locales to translate *to* |
| `locales_dir` | `config/locales` | Where the `<namespace>.<locale>.yml` files live |
| `state_dir` | `.i18n-state` | Where source-hash drift state is tracked |

## Provider & models

| Key | Default | Description |
| --- | --- | --- |
| `provider` | `openai` | RubyLLM provider symbol |
| `translate.model` | `gpt-5-mini` | Model for bulk translation |
| `translate.batch_size` | `20` | Keys per translation request |
| `quality.model` | `gpt-4o-mini` | Model for the AI quality pass |
| `quality.british_spellings` | `false` | Flag en-only American→British drift |
| `quality.terminology` | `business` | `business`, `banking`, `none`, or a path to a YAML list |

## Prompt scaffolding

| Key | Default | Description |
| --- | --- | --- |
| `context` | `"a business application"` | One-phrase product/domain description |
| `placeholder_style` | `"%<name>s, %<count>s"` | Interpolation syntax to preserve |
| `glossary` | `{}` | Domain terms the model must not paraphrase |
| `language_guides` | `{}` | Per-locale guidance (inline text or `file:` path) |

## Validators

| Key | Default | Description |
| --- | --- | --- |
| `validators.missing` | `true` | Report keys absent from a target locale |
| `validators.outdated` | `true` | Report keys whose source changed after translation |
| `validators.duplicate_values` | `false` | Flag non-AR keys duplicating an `activerecord.attributes.*` value |
| `validators.manual_edits` | `false` | Flag hand-edited target values so they aren't overwritten |

## Strict tiers

Each tier lists the violation *types* that make `validate` exit non-zero.

| Key | Default | Used by |
| --- | --- | --- |
| `strict.strict` | `[missing, outdated]` | `validate --strict` |
| `strict.strict_all` | `[missing, outdated, duplicate_value]` | `validate --strict-all` |

## Hooks

| Key | Default | Description |
| --- | --- | --- |
| `after_translate` | `["bundle exec i18n-tasks normalize -p"]` | Commands run (in order) after a successful translate |

> **Note:** Add `bundle exec rails i18n:export` to `after_translate` if you also export locales for JavaScript.

## Packages

| Key | Default | Description |
| --- | --- | --- |
| `packages` | `[]` | Per-location overrides; each has a `path` plus any keys to override |

See [Multiple packages](https://locallingo.zoolutions.llc/docs/packages).