# MWNotif Translation Guide

This directory contains translation files for the MWNotif plugin.

## WordPress 4.6+ Automatic Translation Loading

Since WordPress 4.6, plugins in the WordPress.org directory no longer need to use `load_plugin_textdomain()` 
as WordPress automatically loads the translation files. However, you still need to create and place the 
translation files in the correct location.

## How to Create Translations

1. Generate a POT file using one of these methods:
   - Use WP-CLI: `wp i18n make-pot /path/to/mwnotif/ /path/to/mwnotif/languages/mwnotif.pot --domain=mwnotif`
   - Use Poedit: Create a new catalog from the plugin directory and save it as mwnotif.pot

2. Create language-specific PO files:
   - Copy the POT file to a new file named according to the language code (e.g., `fr_FR.po` for French)
   - Use Poedit or another translation tool to translate the strings
   - Save the file, which will generate both .po and .mo files

3. Place the .po and .mo files in this directory

## Naming Convention

Translation files should follow this naming convention:
- `mwnotif-{locale}.po` - For example: `mwnotif-fr_FR.po` for French
- `mwnotif-{locale}.mo` - For example: `mwnotif-fr_FR.mo` for French

## Testing Translations

To test your translations:
1. Set your WordPress site language to the language you've translated to
2. Refresh the admin page and check if the strings are translated
