Installation
Requirements and setup for WPZylos I18n.
Requirements
| Requirement | Version |
|---|---|
| PHP | ^8.0 |
| WordPress | 6.0+ |
Composer Installation
composer require KYNetCode/wpzylos-i18n
Service Provider Registration
use WPZylos\Framework\I18n\I18nServiceProvider;
$app->register(new I18nServiceProvider());
Container Access
$translator = $app->get(Translator::class);
$translator = $app->get('translator');
Language Files
Place translation files in your plugin's languages/ directory:
your-plugin/
+-- languages/
+-- your-plugin.pot
+-- your-plugin-de_DE.po
+-- your-plugin-de_DE.mo
+-- your-plugin-fr_FR.po
+-- your-plugin-fr_FR.mo