✏️ Updated information: - GitHub username: yourusername → ahmadreza-log - Support email: support@opticore.example → ahmadreza.log@gmail.com - Security email: security@opticore.example → ahmadreza.log@gmail.com - Conduct email: conduct@opticore.example → ahmadreza.log@gmail.com - Dev email: dev@opticore.example → ahmadreza.log@gmail.com - Translation email: translate@opticore.example → ahmadreza.log@gmail.com - Author name: Your Name → Ahmadreza Ebrahimi - Author website: yourwebsite.com → ahmadreza.me - Plugin website: opticore.example → GitHub repository - Copyright year: 2025 📁 Files updated: - opticore.php (plugin header) - README.md - CONTRIBUTING.md - SECURITY.md - CODE_OF_CONDUCT.md - CHANGELOG.md - docs/README.md - docs/README-FA.md - docs/features/emoji-optimization.md - languages/README.md - languages/opticore.pot All placeholder information has been replaced with actual contact details and author information. |
||
|---|---|---|
| .. | ||
| index.php | ||
| opticore.pot | ||
| README.md | ||
🌍 OptiCore Translation Files
This directory contains translation files for OptiCore plugin.
📋 Available Translations
| Language | Code | Status | Contributors |
|---|---|---|---|
| English | en_US | ✅ Default | Core Team |
| Persian (Farsi) | fa_IR | 🚧 In Progress | - |
| Arabic | ar | 📝 Planned | - |
| Spanish | es_ES | 📝 Planned | - |
| French | fr_FR | 📝 Planned | - |
| German | de_DE | 📝 Planned | - |
🔧 How to Translate
Option 1: Using Poedit (Recommended)
- Download Poedit from poedit.net
- Open
opticore.potfile - Create new translation (File → New Translation from POT/PO file)
- Select your language
- Translate all strings
- Save as
opticore-{locale}.po(e.g.,opticore-fa_IR.po) - Poedit will automatically generate
.mofile
Option 2: Using WordPress.org Translation
- Go to WordPress.org Translate
- Find OptiCore plugin
- Select your language
- Start translating
Option 3: Manual Translation
- Copy
opticore.pottoopticore-{locale}.po - Edit the PO file with a text editor
- Translate all msgstr entries
- Generate
.mofile using:msgfmt opticore-fa_IR.po -o opticore-fa_IR.mo
📁 File Structure
languages/
├── opticore.pot # Template file (DO NOT EDIT)
├── opticore-fa_IR.po # Persian translation (Portable Object)
├── opticore-fa_IR.mo # Persian compiled (Machine Object)
├── opticore-ar.po # Arabic translation
├── opticore-ar.mo # Arabic compiled
└── README.md # This file
🔤 Translation Guidelines
1. Context Matters
- Understand the context before translating
- Check where the string is used in the plugin
- Maintain consistency across similar terms
2. Preserve Placeholders
- Keep %s, %d, and other placeholders intact
- Example:
"You have %d items"→"شما %d مورد دارید"
3. Maintain HTML Tags
- Keep HTML tags unchanged
- Example:
"<strong>Note:</strong> Text"→"<strong>توجه:</strong> متن"
4. Technical Terms
- Some technical terms might be better left in English
- Examples: Cache, CDN, API, CSS, JavaScript
5. Character Encoding
- Always use UTF-8 encoding
- Save PO files with UTF-8 without BOM
📝 Common Translation Patterns
Settings Toggles
"Enable %s" → "فعالسازی %s"
"Disable %s" → "غیرفعالسازی %s"
"Remove %s" → "حذف %s"
Messages
"Settings saved successfully!" → "تنظیمات با موفقیت ذخیره شد!"
"An error occurred" → "خطایی رخ داد"
Actions
"Save Settings" → "ذخیره تنظیمات"
"Clear Cache" → "پاک کردن کش"
"Optimize Database" → "بهینهسازی دیتابیس"
🔄 Updating Translations
When plugin is updated with new strings:
-
Update
opticore.potfile using:wp i18n make-pot . languages/opticore.pot -
Update existing translations:
- Open PO file in Poedit
- Catalog → Update from POT file
- Translate new strings
- Save
🤝 Contributing Translations
We welcome translation contributions!
- Fork the repository
- Add your translation files
- Test the translation in WordPress
- Create a Pull Request
- Include screenshots showing the translation
📧 Translation Support
Need help with translation?
✅ Translation Checklist
- All strings translated
- Placeholders preserved
- HTML tags intact
- Technical terms handled appropriately
- Tested in WordPress
- MO file generated
- Screenshots provided
- Pull request created
🙏 Translation Credits
Translators will be credited in:
- Plugin credits page
- README.md
- CHANGELOG.md
Thank you for helping make OptiCore accessible to everyone! 🌍