# paraglide Missing message for locale

## TL;DR

Fixes the Paraglide JS runtime error when a message function is called for a locale with no compiled message. Regenerate messages after adding the translation, or guard the call with a locale check. Use when the error names a locale. Not for messages missing in every locale.

## The error

```text
Error: Missing message for locale "fr". Did you forget to add the message to your messages file?
```

## Fix it

### Step 1: Check the messages file for the locale

```bash
grep -n '"fr"' messages/fr.json | head -3
```

Expected: You see whether French has any messages at all.

### Step 2: Add the missing message and recompile

```bash
npx paraglide-js compile --project ./project.inlang
```

Expected: Compilation succeeds and the message exists for fr.

### Step 3: Call the message with the locale set

```bash
node -e "console.log('invoke the message with locale fr and confirm text renders')"
```

Expected: The message renders instead of throwing.

## When to use this

- Paraglide throws Missing message for a specific locale
- A message works in the source language but not in a target locale

## When NOT to use this

- The compiler rejects the messages file, fix the inlang project config
- Every locale throws, the message id itself is wrong

## Tool and version compatibility

- @inlang/paraglide-js 1.x
- Inlang project with per-locale message files

## Variant phrasings

### error after adding the message

You edited messages but did not recompile. The runtime reads compiled output, not the source files.

### error only for dynamically loaded locales

Dynamic locale bundles need the message compiled into each bundle.

## Why it happens

Paraglide compiles messages per locale at build time. If a message is missing from a locale's source file, the compiled bundle has no function for it, and calling it throws with the locale named so you know exactly which translation to add.

## Edge cases

- Machine-translated messages added by the IDE plugin still need a compile step
- Message ids renamed in code orphan the old entries silently
- Fallback chains are opt-in; without one, a single missing locale throws

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_td64tsnG8kLXCyXK7rzwJA
