Niwa AI translation files belong in this directory.

Expected filenames:
- `niwa-ai-<locale>.po`
- `niwa-ai-<locale>.mo`

Examples:
- `niwa-ai-de_DE.po` / `niwa-ai-de_DE.mo`
- `niwa-ai-sr_RS.po` / `niwa-ai-sr_RS.mo` (Serbian Cyrillic)
- `niwa-ai-sr_Latn_RS.po` / `niwa-ai-sr_Latn_RS.mo` (Serbian Latin)

## Generating the POT and translations

The plugin ships with two scripts in `scripts/`:

- `scripts/extract-pot.php` — re-extracts `niwa-ai.pot` from every `__()` /
  `_e()` / `esc_html__()` / `esc_attr__()` / `esc_html_e()` / `esc_attr_e()` /
  `_x()` / `_n()` (and friends) call across `*.php` files. Skips `vendor/`,
  `node_modules/`, `tests/`, `assets/`.
- `scripts/build-po.php` — regenerates the Serbian Latin and Cyrillic `.po`
  files from `niwa-ai.pot` and the inline translation table.

Run from the plugin root:

```
php scripts/extract-pot.php
php scripts/build-po.php
```

## Compiling `.mo` files

Translation files must be compiled to binary `.mo` for WordPress to load them.
If `msgfmt` (from gettext) is on PATH, run:

```
msgfmt languages/niwa-ai-sr_RS.po       -o languages/niwa-ai-sr_RS.mo
msgfmt languages/niwa-ai-sr_Latn_RS.po  -o languages/niwa-ai-sr_Latn_RS.mo
```

If `msgfmt` is not available, install gettext (Linux: `apt install gettext`,
macOS: `brew install gettext`, Windows: install Poedit which bundles `msgfmt`)
or open the `.po` file in Poedit and use **Catalogue → Compile to MO** (Ctrl+S
saves both formats).
