# Locales & Translation

# Locales & Translation

PT/EN locale architecture and the rule for adding visible UI strings.

**Applies to:** `Nord Inventory v2.0.0`

The build ships with:

```text
locales/en.json
locales/pt.json
```

Selection is controlled in `config/locales.lua`:

```lua
Config.Locale = 'pt'
Config.LocaleFallback = 'en'
```

Locale data is grouped into `notifications`, `nui`, `patterns`, and `server` namespaces. The Lua `L()` helper resolves active language first and fallback second. NUI waits for locale data before rendering localized text.

### Adding a new visible string

1. Add the English key/value to `locales/en.json`.
2. Add the matching Portuguese key/value to `locales/pt.json`.
3. Use the existing translation helper in Lua/NUI instead of hard-coding a visible label.
4. Verify both locales after changing dynamic components such as modals/tabs/search states.

This is especially important for the Recommended Scripts modal: tabs are derived from `integration` values, but visible compatibility labels and UI actions remain locale-aware.
