# FigMoove Plugin - Translations

This directory contains translation files for the FigMoove WordPress plugin in multiple languages.

## Available Languages

- **Spanish (Spain)** - `es_ES`
- **French (France)** - `fr_FR`
- **German (Germany)** - `de_DE`
- **Italian (Italy)** - `it_IT`
- **Portuguese (Brazil)** - `pt_BR`
- **Dutch (Netherlands)** - `nl_NL`
- **Japanese** - `ja`
- **Russian (Russia)** - `ru_RU`

## File Structure

### POT File (Template)
- `figmoove.pot` - The template file containing all translatable strings

### PO Files (Translations)
- `figmoove-{locale}.po` - Human-readable translation files for each language

### MO Files (Compiled)
- `figmoove-{locale}.mo` - Compiled binary files used by WordPress (generated from PO files)

## How WordPress Uses These Files

WordPress automatically loads the appropriate translation file based on:

1. **Site Language**: Set in WordPress Admin → Settings → General → Site Language
2. **User Language**: Individual users can set their preferred language in their profile
3. **Browser Language**: WordPress can detect and use the browser's language preference

## Generating MO Files

The MO files are compiled binary versions of the PO files that WordPress actually uses. To generate them:

### Using msgfmt (recommended)

If you have the `gettext` tools installed:

```bash
# For a specific language
msgfmt figmoove-es_ES.po -o figmoove-es_ES.mo

# For all languages
for file in *.po; do
    msgfmt "$file" -o "${file%.po}.mo"
done
```

### Using Poedit

1. Download [Poedit](https://poedit.net/) (free translation editor)
2. Open any `.po` file in Poedit
3. Save the file (Ctrl+S) - this automatically generates the `.mo` file

### Using Online Tools

- [WordPress.org Translation Tools](https://translate.wordpress.org/)
- [Poedit Online](https://poedit.net/pro)

## Adding New Languages

To add a new language:

1. Copy `figmoove.pot` to `figmoove-{locale}.po`
2. Translate all `msgstr ""` fields to your target language
3. Set the correct language headers in the file
4. Generate the corresponding `.mo` file
5. Test in WordPress with that language selected

### Example for Swedish (sv_SE):

```bash
cp figmoove.pot figmoove-sv_SE.po
# Edit the file and translate all strings
msgfmt figmoove-sv_SE.po -o figmoove-sv_SE.mo
```

## Updating Translations

When the plugin code is updated with new translatable strings:

1. Update the `.pot` file with new strings
2. Update each `.po` file to include the new strings
3. Translate the new strings
4. Regenerate all `.mo` files

## Testing Translations

1. Copy the language files to your WordPress `wp-content/languages/plugins/` directory
2. Change your WordPress site language in Admin → Settings → General
3. Navigate through the plugin interface to verify translations

## Translation Guidelines

- **Context matters**: Consider the UI context when translating
- **Keep it concise**: Respect UI space limitations
- **Technical terms**: Some terms like "Figma", "API", "token" may not need translation
- **Consistency**: Use consistent terminology throughout
- **Pluralization**: Pay attention to plural forms (some languages have complex plural rules)

## Contributing Translations

To contribute translations:

1. Fork the plugin repository
2. Add or improve translation files in this directory
3. Test your translations
4. Submit a pull request

## Technical Notes

- **Text Domain**: All translations use the text domain `figmoove`
- **Encoding**: All files use UTF-8 encoding
- **Plural Forms**: Correctly configured for each language's pluralization rules
- **Context**: Some strings include translator comments for context

## Language-Specific Notes

### Japanese
- Uses no plural forms (`nplurals=1`)
- Includes proper Japanese typography and spacing

### Russian
- Complex plural forms with 4 variations
- Properly handles Cyrillic characters

### Arabic (Future)
- Would require RTL (right-to-left) support
- Special plural form rules

## Support

For translation issues or questions:
- Create an issue in the plugin repository
- Contact the plugin developers
- Join the WordPress translation team for your language

---

**Note**: This plugin follows WordPress internationalization (i18n) best practices. All user-facing text is properly wrapped in translation functions like `__()`, `_e()`, `_n()`, etc. 