# Translations for Topomer Plugin

## Compiling Translation Files

To compile the `.po` file to a `.mo` file (required for WordPress to load translations), you need to use `msgfmt` from the gettext tools.

### On Windows:
1. Install gettext tools from: [gettext tools](https://mlocati.github.io/articles/gettext-iconv-windows.html)
2. Or use [Poedit](https://poedit.net/) which can compile automatically

### On Linux/Mac:
```bash
msgfmt topomer-en_US.po -o topomer-en_US.mo
```

### Using Poedit:
1. Open `topomer-en_US.po` in Poedit
2. Click "Save" - Poedit will automatically compile the `.mo` file

## Adding New Translations

1. Edit `topomer.pot` to add new translatable strings
2. Update `topomer-en_US.po` with English translations
3. Compile to `.mo` file
4. WordPress will automatically load translations based on the site language

## Language Files Structure

- `topomer.pot` - Template file with all translatable strings
- `topomer-en_US.po` - English translations (source)
- `topomer-en_US.mo` - Compiled English translations (binary, needs to be generated)
- `topomer-fr_FR.po` - French translations (if needed)
- `topomer-fr_FR.mo` - Compiled French translations (if needed)

WordPress will automatically load the appropriate language file based on the site's language setting.