wpdiggerstudio / wpzylos-i18n
Internationalization wrapper for WPZylos framework
Fund package maintenance!
Paypal
Installs: 260
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/wpdiggerstudio/wpzylos-i18n
Requires
- php: ^8.0
- wpdiggerstudio/wpzylos-core: ^1.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6 || ^10.0
- squizlabs/php_codesniffer: ^3.7
- szepeviktor/phpstan-wordpress: ^1.3
README
Internationalization wrapper for WPZylos framework.
📖 Full Documentation | 🐛 Report Issues
✨ Features
- Text Domain Loading — Automatic text domain registration
- Translation Helpers — Plugin-scoped
__()and_e()wrappers - Context Awareness — Uses plugin text domain automatically
- Pluralization — Handle singular/plural forms
📋 Requirements
| Requirement | Version |
|---|---|
| PHP | ^8.0 |
| WordPress | 6.0+ |
🚀 Installation
composer require wpdiggerstudio/wpzylos-i18n
📖 Quick Start
use WPZylos\Framework\I18n\Translator; $translator = new Translator($context); // Translate strings echo $translator->__('Hello World'); echo $translator->_n('One item', '%d items', $count);
🏗️ Core Features
Translation Methods
// Simple translation $label = $translator->__('Settings'); // Echo translation $translator->_e('Save Changes'); // Pluralization $message = $translator->_n( 'You have %d item', 'You have %d items', $count ); // With context $text = $translator->_x('Post', 'noun');
Text Domain Loading
// Automatically loads from languages/ directory // my-plugin/languages/my-plugin-{locale}.mo $translator->load();
📦 Related Packages
| Package | Description |
|---|---|
| wpzylos-core | Application foundation |
| wpzylos-scaffold | Plugin template |
📖 Documentation
For comprehensive documentation, tutorials, and API reference, visit wpzylos.com.
☕ Support the Project
If you find this package helpful, consider buying me a coffee! Your support helps maintain and improve the WPZylos ecosystem.
📄 License
MIT License. See LICENSE for details.
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Made with ❤️ by WPDiggerStudio