# Translations

GetMD is translated into multiple languages. Help us reach more users by contributing translations.

## Available Languages

| Language | Locale | Status |
|----------|--------|--------|
| English | en_US | Default |
| Spanish (Spain) | es_ES | Complete |
| French (France) | fr_FR | Complete |
| Persian (Iran) | fa_IR | Complete |
| Portuguese (Brazil) | pt_BR | Complete |

## Using Translations

WordPress automatically loads translations based on your site's language setting:

1. Go to **Settings → General**
2. Set **Site Language** to your preferred language
3. GetMD will display in that language if a translation exists

## Contributing Translations

### Option 1: WordPress.org (Recommended)

Contribute via the [WordPress.org translation platform](https://translate.wordpress.org/projects/wp-plugins/summix-getmd/). Translations submitted there are automatically distributed to all users.

### Option 2: Manual Translation

1. Copy `summix-getmd.pot` to `summix-getmd-{locale}.po`
2. Translate all `msgstr` entries using a PO editor like [Poedit](https://poedit.net/)
3. Generate the `.mo` file:
   ```bash
   wp i18n make-mo summix-getmd-{locale}.po
   ```
4. Submit a pull request or email to hello@summix.io

### Locale Codes

Use standard WordPress locale codes:

- `de_DE` - German (Germany)
- `es_ES` - Spanish (Spain)
- `es_MX` - Spanish (Mexico)
- `fr_FR` - French (France)
- `it_IT` - Italian
- `ja` - Japanese
- `ko_KR` - Korean
- `nl_NL` - Dutch
- `pt_BR` - Portuguese (Brazil)
- `pt_PT` - Portuguese (Portugal)
- `ru_RU` - Russian
- `zh_CN` - Chinese (Simplified)
- `zh_TW` - Chinese (Traditional)

## File Structure

```
languages/
├── README.md              # This file
├── summix-getmd.pot       # Translation template (source strings)
├── summix-getmd-es_ES.po  # Spanish translation source
├── summix-getmd-es_ES.mo  # Spanish compiled binary
├── summix-getmd-fr_FR.po  # French translation source
├── summix-getmd-fr_FR.mo  # French compiled binary
├── summix-getmd-fa_IR.po  # Persian translation source
├── summix-getmd-fa_IR.mo  # Persian compiled binary
├── summix-getmd-pt_BR.po  # Brazilian Portuguese source
└── summix-getmd-pt_BR.mo  # Brazilian Portuguese binary
```

## Regenerating the POT File

After adding new translatable strings to the plugin:

```bash
npm run makepot
```

This extracts all strings wrapped in `__()`, `_e()`, `esc_html__()`, etc.

## Questions?

- Email: hello@summix.io
- GitHub: [summix/getmd](https://github.com/summix/getmd)
